Question

I am doing a text classification experiment with Theano's DBN (Deep Belief Network) and SDA (Stacked Denoising Autoencoder) examples. I have produced a feature/label dataset just as Theano's MINST dataset is produced and changed the feature length and output values of those examples to adopt to my dataset (2 outputs instead of 10 outputs, and the number of features is adopted to my dataset). Every time i run the experiments (both DBN and SDA) i get an exact 50% validation error and test error. Do you have any ideas what i'm doing wrong? because i have just produced a dataset out of Movie Review Dataset as MINST dataset format and pickled it.

my code is the same code you can find in http://www.deeplearning.net/tutorial/DBN.html and my SDA code is the same code you can find in http://www.deeplearning.net/tutorial/SdA.html

The only difference is that i have made my own dataset instead of MINST digit recognition dataset. My dataset is Bag of Words features from Movie Review Dataset which of course has different number of features and output classes so i just have made tiny modifications in function parameters number of inputs and output classes. The code runs beautifully but the results are always 50%. This is a sample output:

Pre-training layer 2, epoch 77, cost  -11.8415031463
Pre-training layer 2, epoch 78, cost  -11.8225591118
Pre-training layer 2, epoch 79, cost  -11.8309999005
Pre-training layer 2, epoch 80, cost  -11.8362189546
Pre-training layer 2, epoch 81, cost  -11.8251214285
Pre-training layer 2, epoch 82, cost  -11.8333494168
Pre-training layer 2, epoch 83, cost  -11.8564580976
Pre-training layer 2, epoch 84, cost  -11.8243052414
Pre-training layer 2, epoch 85, cost  -11.8373403275
Pre-training layer 2, epoch 86, cost  -11.8341470443
Pre-training layer 2, epoch 87, cost  -11.8272021013
Pre-training layer 2, epoch 88, cost  -11.8403720434
Pre-training layer 2, epoch 89, cost  -11.8393612003
Pre-training layer 2, epoch 90, cost  -11.828745041
Pre-training layer 2, epoch 91, cost  -11.8300890796
Pre-training layer 2, epoch 92, cost  -11.8209189065
Pre-training layer 2, epoch 93, cost  -11.8263340225
Pre-training layer 2, epoch 94, cost  -11.8348454378
Pre-training layer 2, epoch 95, cost  -11.8288419285
Pre-training layer 2, epoch 96, cost  -11.8366522357
Pre-training layer 2, epoch 97, cost  -11.840142131
Pre-training layer 2, epoch 98, cost  -11.8334445128
Pre-training layer 2, epoch 99, cost  -11.8523094141

The pretraining code for file DBN_MovieReview.py ran for 430.33m

... getting the finetuning functions
... finetuning the model
epoch 1, minibatch 140/140, validation error 50.000000 %
     epoch 1, minibatch 140/140, test error of best model 50.000000 %
epoch 2, minibatch 140/140, validation error 50.000000 %
epoch 3, minibatch 140/140, validation error 50.000000 %
epoch 4, minibatch 140/140, validation error 50.000000 %
Optimization complete with best validation score of 50.000000 %,with test performance 50.000000 %

The fine tuning code for file DBN_MovieReview.py ran for 5.48m

I ran both SDA and DBN with two different feature sets. So i got this exact 50% accuracy on all these 4 experiments.

Was it helpful?

Solution

I asked the same question in Theano's user groups and they answered that feature values should be between 0 and 1.

So i used a normalizer to normalize feature values and it solved the problem.

OTHER TIPS

I had same problem. I think this problem is because of Overshooting. So I decreased learning rate 0.1 to 0.013 and increase epoch. Then it works. But I'm not sure your problem is same.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top