0
$\begingroup$

I am trying to train a VGG-19 neural network on STL-10 dataset containing 5000 images(500 for each class). And the number of output classes is 10.

I have made no changes to the architecture except that I reduced the size of fully-connected layer from 4096 to 2048, keeping the dropout(0.5) same

[The reason behind doing this is that, since the number of training images is less, so to avoid over-fitting, I decreased the size of fully-connected layer, but I don't know if this is the right thing to do].

I have also used Adam optimiser(learning rate = 0.001) instead of SGD as mentioned in the paper.

I have only run the code for only 4 epochs. And I have observed that although the cost is decreasing by very small amount, but the training accuracy is decreasing.

After the 1st epoch, cost:: 2.304091 and training accuracy:: 11.99%

After the 2nd epoch, cost:: 2.303365 and training accuracy:: 11.249%

After the 3rd epoch, cost:: 2.301936 and training accuracy:: 10.5625%

After the 4th epoch, cost:: 2.30415 and training accuracy:: 8.1249%

I want to know, that is this behavior natural or is it due to some fault in the changes I made in the architecture? Or using less number of layers would have been better? (For example VGG-16)

(This is my first hands-on neural network experience)

$\endgroup$

1 Answer 1

1
$\begingroup$

I am not very sure about your case, usually I have seen the same problem but in the other direction, you can take a look here:

I would guess that your DNN is getting more answers right but without impoving its confidence a lot.

Regarding your other questions, I would advise you to start with simplest possible model, for example, in this case it would be using the vgg16 (which is widely more used than the vgg19) and the default parameters ( number of neurons, optimization function...) Once you have something working you can start tuning and modifying things.

$\endgroup$
3
  • $\begingroup$ I changed nothing, except, I changed the way I was feeding data to feed_dict. I was taking the batch as a tensor and again used eval on it to get the numpy array. I removd the entire tensor thing and just used numpy arrays directly. Now, the accuracy started from 2.5%, went up till 7.5% then again decreased to 5%, again increased to 10%, again decreased to 7.5% again increased to 12.5%. Then suddenly dropped to 2.5%. And now rising again $\endgroup$
    – Siladittya
    Mar 28, 2018 at 15:39
  • $\begingroup$ I am looking forward to do what you advised. Thanks for that. $\endgroup$
    – Siladittya
    Mar 28, 2018 at 15:40
  • $\begingroup$ I have implemented the VGG16 and as given in the paper. The training accuracy for the first 8 epochs are 12.5%, 12.5%, 12.5%, 10%,5%,2.5%,10%,5%. Can you give me some information on how this training accuracy is actually measured. I am actually passing the last training batch as the batch to measure the training accuracy. $\endgroup$
    – Siladittya
    Mar 30, 2018 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.