- 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
3 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Himanshu
2023 年 3 月 30 日
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.
参考
カテゴリ
Help Center および File Exchange で Pattern Recognition and Classification についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!