- 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!