domerin0 / neural-sentiment

A sentiment analyzer using deep rnns, built with TensorFlow
62 stars 22 forks source link

Dropout used incorrectly! #27

Open prolearner opened 7 years ago

prolearner commented 7 years ago

during the test the dropout_keep_prob parameter is not set to 1 as it should, the dropout_keep_prob parameter shouldn't be constant but a placeholder or at least a tf.Variable

domerin0 commented 7 years ago

Thanks for bringing this to my attention. I will make the fix this week. I like the idea of making it a placeholder.

trideeprath commented 7 years ago

Would this change affect the accuracy of the model. What I mean to ask is, whether this is a code design change or model improvement change ?

prolearner commented 7 years ago

I think the error is still there, you need to set the dropout to 1 when forward_only (i.e during the testing step) anyway i did the change on my own and i can confirm an improvement on accuracy up to 1% on my best model with less overfitting (I have dropout_keep_prob = 0.7)

domerin0 commented 7 years ago

It's probably an oversight on my part, I thought I had made that change a while ago but apparently not. Thanks for bringing this to my attention.