我有下面的代码,其中输入是91×33矩阵,输出是91×1向量。
output1=categorical(output)
trInput=input(1:78,:);
trInput=trInput';
teInput=input(79:end,:);
teInput=teInput';
trOutput=output1(1:78);
trOutput=trOutput';
teOutput=output1(79:end);
teOutput=teOutput';
layers = [ ...
imageInputLayer([33 1 1 ])
convolution2dLayer(1,33,'NumChannels',1 )
reluLayer
maxPooling2dLayer(1)
fullyConnectedLayer(5)
softmaxLayer
classificaationLayer()]
opts = trainingOptions('sgdm','MaxEpochs',2, ...
'InitialLearnRate',0.001);
net = trainNetwork(trInput,trOutput,layers,opts);
YPred = classify(net,teInput);
我收到以下错误:
The training images are the wrong size for this network.
反复试验无法给我任何结果。我该怎么办?