필터 지우기
필터 지우기

Matrices as input and target for a neural network: "Number of inputs does not match net.numInputs."

조회 수: 3 (최근 30일)
I'm attempting to train a neural network with a 425x12273 uint8 matrix as the network input, and a 1x12273 uint8 matrix as the network target. I have 12273 training examples and correct outputs stored in these matrices (the first and second ones, respectively). The neural network I've created takes in 425 inputs and ultimately outputs a single value.
When attempting to run (where X is 425x12273, T is 1x12273)
[net,tr] = train(net,X,T)
I get the error "Number of inputs does not match net.numInputs." How can I use these matrices as proper inputs to the network?
Note: I have tried
X = num2cell(X, 1)
T = num2cell(T, 1)
in order to get these matrices into cell array format; the error persists.

답변 (1개)

MUHAMMED IRFAN
MUHAMMED IRFAN 2018년 6월 14일
Hello, Are you trying to attempt a classification problem ?? If so..
As I can understand , you are trying to train some 12273 elements , each of them are defined by their 425 features. You haven't mentioned in the question how many classes you want to classify them into .
You have just mentioned "correct outputs stored in these matrices (the first and second ones, respectively)". If you are trying to classify into 2 classes, your target should be og size 2 * 12273 instead of 1 * 12273 , each row corresponding to their respective classes.

카테고리

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

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by