Matrices as input and target for a neural network: "Number of inputs does not match net.numInputs."
2 次查看(过去 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.
0 个评论
回答(1 个)
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!