how to predict after traing

Solved!
Posted in General by kwang nam Fri Oct 16 2015 03:20:04 GMT+0000 (UTC)·4·Viewed 1,461 times

Hi I have a question After training a model , How can I predict using sample data ?
kwang nam
Oct 16, 2015

I found it
thx

Markus Beissinger
Oct 16, 2015

Sorry I've been extremely busy these past few weeks - new beta version of opendeep coming out this weekend!


Markus Beissinger marked this as solved
kwang nam
Oct 18, 2015

Now I can't make new post, I put the new question here

I have a question on result of run()

Hi
I have a question on result of run().
When I run softmax_mnist , I get this result , size of test array is 5

preds[5,10] and the values are

[[ 7.79313609e-07 1.18905493e-12 4.04795946e-06 2.12532212e-03
9.57465360e-08 6.67092263e-06 3.14186108e-11 9.97708559e-01
3.35180403e-06 1.51176428e-04]
[ 1.08663400e-04 1.32613820e-06 9.94510293e-01 1.13304262e-03
1.55034846e-14 1.33137475e-03 2.72009033e-03 3.27251378e-17
1.95211105e-04 1.82898537e-13]
[ 3.34346197e-07 9.82576489e-01 9.41284560e-03 1.34801504e-03
6.81932361e-05 8.98711500e-04 5.29030105e-04 2.33027013e-03
2.70190532e-03 1.34118003e-04]
[ 9.99873161e-01 2.51106839e-12 2.67076830e-05 6.46700846e-06
1.21707275e-08 4.38480456e-05 3.85655003e-05 4.43108411e-06
5.44648128e-06 1.29965485e-06]
[ 3.80307640e-04 3.94314164e-08 1.51696475e-03 3.73868425e-05
9.65437472e-01 1.03483668e-04 9.71900357e-04 5.52246114e-03
2.09036795e-03 2.39395555e-02]]
[[ 0. 0. 0. 0. 0. 0. 0. 1. 0. 0.]
[ 0. 0. 1. 0. 0. 0. 0. 0. 0. 0.]
[ 0. 1. 0. 0. 0. 0. 0. 0. 0. 0.]
[ 1. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
[ 0. 0. 0. 0. 1. 0. 0. 0. 0. 0.]]

But when I run rbm_mnist

it returns ( size of test array is 25)
preds[25,784] and when I print preds[0]

[ 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.

                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 1.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 1.
                                  1. 0.
                                  1. 0.
                                  1. 1.
                                  1. 0.
                                  1. 0.
                                  1. 1.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                                  1. 0.
                  1. 0.]

1) I'd like to get same size[(25)test_size][(10)output_size] of result like soft_max when I run rbm_minst , How can I do it ?

2) Except softmax , other models don't set output_size and use input size as output_size .
I think I need to set output_size , Am i wrong ?

Markus Beissinger
Oct 27, 2015

RBM and GSN/Autoencoder models are unsupervised - this means their output is the same as the input i.e. they generate a reconstruction of what the input should look like. When you use Softmax, you are classifying a supervised problem (where you have labels). Hope this clears things up!
Here is a tutorial on RBM: http://deeplearning.net/tutorial/rbm.html

Markdown is allowed