Error Message when using configured ANN (mismatch number of inputs)
이전 댓글 표시
After creating and storing an ANN in Matlab (ANN Toolbox V 7.0) I tried to compute new predictions using a new set of input observations with:
net(new_obs)
the old Input Matrix was 1511x145, the new one is 100x145, observations are in rows each time. But the error message I get is now:
??? Error using ==> network.sim at 121
Number of inputs does not match net.numInputs.
Error in ==> network.subsref at 14
[v,out2,out3] = sim(vin,subs{:});
In fact, the origin Input matrix does not work with this code either!
I'm wondering if this error corresponds to the type of ANN I'm using since this one is a NARX. But I created a different ANN for a completely different purpose (Pattern Recognition with binary outcome) and there it works at a glance. :-/
Help is greatly appreciated!
채택된 답변
추가 답변 (6개)
Tyler Roman
2016년 1월 11일
1 개 추천
I came across this thread and believe I'm having a very similar issue. I've been able to get an idea of where the problem lies, but it would be helpful to see a full set of code if someone could provide it (The link posted above is no longer valid). I basically have trained a ANN in hopes of using it to fill in some missing data from a time series. I'm able to train it fine but am having trouble getting output when running it on new input data (matrix with 6 columns) to get a single output.
Léon
2011년 9월 16일
0 개 추천
댓글 수: 1
Lucas García
2011년 9월 16일
Can you provide some more info of the architecture of your network? Some code will be helpful to try to understand the problem.
Léon
2011년 9월 17일
0 개 추천
댓글 수: 1
Lucas García
2011년 9월 19일
Hi Léon,
Can't see your code in the link you provided. However, I think it's a matter of how inputs are being presented to the network. I have updated my previous answer trying to be a little more clear.
Léon
2011년 9월 21일
0 개 추천
댓글 수: 1
Lucas García
2011년 9월 21일
Hi Léon,
I have been able to access your link and execute your code. And it works fine. I have tried both in MATLAB R2011b and R2010b (which is the one I think you are using).
1. Make sure you clear all your variables before executing your code.
2. Have you changed any MATLAB files in the toolbox? If you have, you probably need to reinstall the toolbox.
Léon
2011년 9월 22일
0 개 추천
댓글 수: 1
Lucas García
2011년 9월 22일
I use narxnet for creating the network and then use the net object to do the simulation. Exactly the same that you do for a simple pattern neural network.
Try to execute the code in this link:
http://www.mathworks.es/matlabcentral/answers/14970-neural-network-multi-step-ahead-prediction
The data is available in the toolbox, so you should be able to execute it straight away. Let me know if it works.
If it doesn't then you will have to debug the sim function to try to identify the source of the problem.
카테고리
도움말 센터 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!