Open RyanCV opened 7 years ago
Its hard to say exactly without seeing your exact code and data formats. However, it seems like the dimensionality of your label matrix (Y) could be incorrect. Check the shape of Y and try permuting it so that it matches that of the final output layer.
Thanks for your help, it solves the problem.
@joncox123 by the way, where can I find '~/mnist_full.mat' in order to run your example?
@joncox123 , if I want to design a network only has one hidden layer (including one Fully_connected layer + ReLU), and the output layer is only Fully_connected layer, is the following design right??
layers.af{1} = [];
layers.sz{1} = [input_size 1 1];
layers.typ{1} = defs.TYPES.INPUT; (input layer)
layers.af{end+1} = ReLU(defs, defs.COSTS.SQUARED_ERROR);
layers.sz{end+1} = [input_size 1 1];
layers.typ{end+1} = defs.TYPES.FULLY_CONNECTED; (hidden layer 1)
layers.af{end+1} = ReLU(defs, defs.COSTS.SQUARED_ERROR); (**for this line, if I use [], there will be error??** )
layers.sz{end+1} = [output_size 1 1];
layers.typ{end+1} = defs.TYPES.FULLY_CONNECTED; (**output layer, how to set it only has fully connected layer??**)
X = varObj(X,defs, defs.TYPES.INPUT);
Y = varObj(Y,defs, defs.TYPES.OUTPUT);
Thanks.
The network defined as follows: input size = 100, output size = 4
Error in