I am currently trying to get a decent score (> 40% accuracy) with Keras on CIFAR 100. However, I\'m experiencing a weird behaviour of a CNN model: It tends to predict some c
I don't see you doing mean-centering, even in datagen. I suspect this is the main cause. To do mean centering using ImageDataGenerator
, set featurewise_center = 1
. Another way is to subtract the ImageNet mean from each RGB pixel. The mean vector to be subtracted is [103.939, 116.779, 123.68]
.
Make all activations relu
s, unless you have a specific reason to have a single tanh
.
Remove two dropouts of 0.25 and see what happens. If you want to apply dropouts to convolution layer, it is better to use SpatialDropout2D
. It is somehow removed from Keras online documentation but you can find it in the source.
You have two conv
layers with same
and two with valid
. There is nothing wrong in this, but it would be simpler to keep all conv
layers with same
and control your size just based on max-poolings.