ov'); legend('Train loss','Train 0-1 error');


%% calculate test error

testlenet = lenet;
testlenet{1}.fName = testImages;
testlenet{2}.fName = testLabels;
testNet = ConvNet(testlenet,atGPU);
testNet.setTheta(cnn.theta);
testNet.calcLossAndErr();
fprintf(1,'Test loss= %f, Test accuracy = %f\n',testNet.Loss(1),1-testNet.Loss(2));


##### SOURCE END #####
--></body></html>