neural network "train" throwing indexing error using example data

5 ビュー (過去 30 日間)
Brendan Carter
Brendan Carter 2022 年 10 月 19 日
編集済み: Saikat Sengupta 2023 年 8 月 28 日
I've started having trouble with a neural network fitting code segment that used to work just fine.
The code gives me a large number of nested errors:
Index in position 1 exceeds array bounds (must not exceed 1).
Error in initnw>initialize_layer (line 176)
range(inputStart(j):inputStop(j),:) =
temp2((inputStart(j):inputStop(j))-inputStart(j)+1,:);
Error in initnw (line 101)
out1 = initialize_layer(in1,in2);
Error in initlay>initialize_network (line 155)
net = feval(initFcn,net,i);
Error in initlay (line 97)
out1 = initialize_network(in1);
Error in network/init (line 32)
net = feval(initFcn,net);
Error in network/configure (line 253)
net = init(net);
Error in nntraining.config (line 146)
net = configure(network(net),X,T);
Error in nntraining.setup>setupPerWorker (line 102)
[net,X,Xi,Ai,T,EW,Q,TS,err] = nntraining.config(net,X,Xi,Ai,T,EW,configNetEnable);
Error in nntraining.setup (line 77)
[net,data,tr,err] = setupPerWorker(net,trainFcn,X,Xi,Ai,T,EW,enableConfigure);
Error in network/train (line 335)
[net,data,tr,err] =
nntraining.setup(net,net.trainFcn,X,Xi,Ai,T,EW,enableConfigure,isComposite);
Error in TRACE_NN_Fit (line 122)
[Nets.(strcat('Eqn',num2str(Equation))).Atl.(Name),tr] =
train(net,P(InAtlInds,:)',Data(InAtlInds,:)');
There's a lot involved up to that point, so rather than give my specific application, I'll note that I get the same error using the Neural Net Fitting Wizard (nftool) with the built-in example data provided in the tool under the name "body fat" or "abalone rings" (the problem seems to happen whenever the input is more than 1 dimension... here's the GUI image):
Any suggestions?
Thanks in advance... had this problem for a year or two now across multiple computers.

採用された回答

Brendan Carter
Brendan Carter 2022 年 10 月 20 日
編集済み: Brendan Carter 2022 年 10 月 20 日
A colleague just pointed out that there is a function name conflict with a sub function several layers down from the cpt_cmap submission. Moving cpt_cmap off the path seemed to resolve the issue.
  1 件のコメント
Saikat Sengupta
Saikat Sengupta 2023 年 8 月 28 日
編集済み: Saikat Sengupta 2023 年 8 月 28 日
Hi Brendan,
Thank you for updating your post with an answer. Could you please elaborate a bit on how you solved it ? I am having the same issue, but I cant find cpt_cmap in my installation (which cpt_cmap does not find anything). I dont recall installing a cptcmap package.
thanks in advance,
Saikat Sengupta

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by