Neural Network input error

5 vues (au cours des 30 derniers jours)
Gaseb Alotibi
Gaseb Alotibi le 31 Oct 2015
Commenté : MUKESH KUMAR le 8 Mai 2020
i have a table of input 30 rows* 9 columne and target table 30*1
i tried to run newff as below net=feedforwardnet(1) [tr,net]=train(net,input,target)
but it does not work because of an error below Error using network/train (line 340) Number of inputs does not match net.numInputs.
any advice pls

Réponse acceptée

Greg Heath
Greg Heath le 4 Nov 2015
input and target matrices should have the same number of columns
[ I N ] = size(input)
[ O N ] = size(target)
Hope this helps.
Thank you for formally accepting my answer
Greg

Plus de réponses (1)

Nitin Khola
Nitin Khola le 3 Nov 2015
This appears to be a dimension mismatch issue. If you are new to using the Neural Network Toolbox, I would strongly recommend using the app. To open the app, use the "nnstart" command. The app allows to select which of the two, rows or columns, are the samples. By default, when using commands for the Neural Network Toolbox, users often run into issues because they expect the "rows" to be treated as samples when the function that they use treats "columns" as samples. The app offers a choice and it will help you ensure that the dimensions match.
  1 commentaire
MUKESH KUMAR
MUKESH KUMAR le 8 Mai 2020
I faced issue after tranning model and during prediction same error "Error using network/sim (line 266)
Number of inputs does not match net.numInputs."
while i tried both sim(net,input) or sim(net,input') with same size of data input in traning

Connectez-vous pour commenter.

Catégories

En savoir plus sur Sequence and Numeric Feature Data Workflows dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by