필터 지우기
필터 지우기

Custom neural network - input mismatch

조회 수: 1 (최근 30일)
Malintha Fernando
Malintha Fernando 2017년 11월 25일
답변: Jose Marques 2017년 11월 25일
I have created a custom neural network with following configurations.
multinet = network;
multinet.numInputs = 44;
multinet.numLayers = 2;
multinet.biasConnect = [1;1];
multinet.layerConnect = [0 0;1 0];
multinet.inputConnect = ipconnect;
multinet.outputConnect = [0 1];
multinet.trainfcn = 'trainbfg';
ipconnect is a 2*44 matrix, in which the first row is all ones and the second is all zeros. My input is a 44*72 matrix (h_tr) and the target variables are in a 1*72 (ytr_t) vector. Whenever I try to invoke the train function, it returns the following error.
[m_net,tr] = train(multinet, h_tr, ytr_t);
Error using network/train (line 340)
Number of inputs does not match net.numInputs.
But when I check with multinet.numInputs it returns 44. Really appreciate any inputs on this. Thanks in advance.

답변 (1개)

Jose Marques
Jose Marques 2017년 11월 25일
Please, verify the order of elements. Maybe you can try to transposte the inputs matrix.

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by