my input is a combined datastore of - 28x28 double input, and 1x1 categorical label.
layers = [
imageInputLayer([28 28 1],"Name","imageinput","Normalization","none")
fullyConnectedLayer(1,"Name","fc_2")
softmaxLayer("Name","softmax")
classificationLayer("Name","classoutput")];
miniBatchSize = 28;
options =
trainingOptions('adam', ...
'ExecutionEnvironment','cpu', ...
'MaxEpochs',84, ...
'MiniBatchSize',miniBatchSize, ...
'GradientThreshold',2, ...
'Shuffle','never',...
'Verbose',0, ...
'Plots','training-progress');
net = trainNetwork(cdsTrain,layers,options);
i get an error at trainnetwork script:
Number of elements must not change. Use [] as one of the size inputs to automatically calculate the appropriate size for that dimension.
Caused by:
Number of elements must not change. Use [] as one of the size inputs to automatically calculate the appropriate size for that dimension.
I have tried quite a few similar designs for layers, by adding a few more layers in different manners, but they all display the same error, so i suspect it has something to do with the fully connected layer.
0 Comments
Sign in to comment.