Reputation: 41
I am trying to use ConvLSTM layers in Keras 2 to train an action recognition model. The model has 3 ConvLSTM layers and 2 Fully Connected ones.
At each and every epoch the accuracy for the first batch (usually more than one) is zero and then it increases to some amount more than the previous epoch. For example, the first epoch finishes at 0.3 and the next would finish at 0.4 and so on.
My question is why does it get back to zero at each epoch?
p.s.
SGD(lr=0.001, decay=1e-6, momentum=0.9, nesterov=True)
, for some reason it does not converge using Adam.Upvotes: 4
Views: 1698
Reputation: 40516
So - in order to understand why something like this happening you need to understand how keras
computes accuracy during the batch computation:
As your accuracy is pretty low it's highly probable that in a first few batches none of the examples will be classified properly. Especially when you have a small batch. This makes accuracy to be 0 at the beginning of your training.
Upvotes: 1