using Dropout
rick779 opened this issue · comments
rick779 commented
Hi,
I would like to try adding a dropout layer but I get this error on Train method: Volume should have a Shape [1] to be converter to a System.Double. What did I do wrong? I would also like to know how to avoid using the dropout layer when I'm not in training (testing).
Many Thanks
Net<double> net
net.AddLayer(new InputLayer(28, 28, 1));
net.AddLayer(new ConvLayer(3, 3, 10) { Stride = 1, Pad = 2 });
net.AddLayer(new ReluLayer());
net.AddLayer(new PoolLayer(2, 2) { Stride = 1 });
net.AddLayer(new FullyConnLayer(10));
net.AddLayer(new ReluLayer());
net.AddLayer(new DropoutLayer(0.5));
net.AddLayer(new FullyConnLayer(2));
net.AddLayer(new SoftmaxLayer(2));
....
var outputVolume = BuilderInstance.Volume.From(flattenedOutput, new Shape(1, 1, 2, InputData.Count));
trainer.Train(inputVolume, outputVolume); //error
Cédric Bovar commented
rick779 commented
thank you very much, great project