0

When i don't use dropout in my model for cat and dog classification, the predicted values remain normal i.e not the same value for all images.

But when I use tf.nn.dropout with keep_prob = 0.8 for my model which was recommended for regularizing the model and for better accuracy, it keeps predicting the same values like this. How do i solve this? Every tutorial or code out there uses tflearn and this does not happen.

array([[ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00]`
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
Sociopath
  • 13,068
  • 19
  • 47
  • 75
  • Please provide more context - what programming language/tool are you using? Specify cleary what do you want to achieve and what you alredy did to try resolve the problem yourself. Also the pasted code is hard to read, better formating would help you with getting answers. – Plebejusz Sep 11 '18 at 10:30
  • I am new to stackoverflow. Sorry for the bad formatting. To resolve the problem i tried using different values for keep_prob in tf.nn.dropout. But everytime the predicted values gets messed up and becomes the same as if have posted in the question. I can't understand why it's happening. If i don't use dropout this does not happen. Thank you. – Arif Raihan Sep 11 '18 at 12:12

0 Answers0