Can't Replicate A Matconvnet Cnn Architecture In Keras
I have the following architecture of a Convolutional Neural Network in matconvnet which I use to train on my own data: function net = cnn_mnist_init(varargin) % CNN_MNIST_LENET Ini
Solution 1:
In your MatConvNet version, you use SGD with momentum.
In Keras, you use rmsprop
With a different learning rule you should try different learning rates. Also sometimes momentum is helpful when training a CNN.
Could you try the SGD+momentum in Keras and let me know what happens?
Another thing that might be different is that the initialization. for example in MatConvNet you use gaussian initialization with f= 0.0125 as the standard deviation. In Keras I'm not sure about the default initialization.
In general, if you don't use batch normalization, the network is prone to many numerical issues. If you use batch normalization in both networks, I bet the results would be similar. Is there any reason you don't want to use batch normalization?
Post a Comment for "Can't Replicate A Matconvnet Cnn Architecture In Keras"