- Check the dimensions of the input matrix you are using for simulation. Ensure that it has the exact dimensions used during training (5x1656).
- Ensure that your network is configured correctly before the simulation. The "view" function can visualize the network structure and verify the input and output dimensions.
- If the input matrix dimensions are correct, double-check how you call the "sim" function.
Error running trained network in NARX
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I trained the network using 5x1656 matrix as input and 1x1656 as target using Bayesian Regularization in NARX. I am getting the following error when I try to deploy the trained network:
Error using network/sim (line 266)
Number of inputs does not match net.numInputs.
Error in network/subsref (line 15)
otherwise, v = sim(vin,subs{:});
Please help me sort this. (I am not of computer science background, hence cannot understand code. Please keep in mind while answering)
0 comentarios
Respuestas (1)
Himanshu
el 30 de Mzo. de 2023
Hello Pavithra,
As per my understanding, you are facing an error while deploying your trained NARX network in MATLAB. The error occurs because the number of input dimensions doesn't match the expected input dimensions of the network.
I assume you have successfully trained your NARX network using the Bayesian Regularization method. You can follow the below steps to troubleshoot the error:
% syntax to view neural network
view(net);
% syntax to simulate neural network
output = sim(net, input);
% where 'net' is your trained NARX network, and 'input' is the input matrix with dimensions 5x1656
You can refer to the below documentation to understand more about the "view" and "sim" functions in MATLAB.
Ver también
Categorías
Más información sobre Pattern Recognition and Classification en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!