Why does the deep learning toolbox cannot work?
Mostra commenti meno recenti
I write the following code to test the toolbox, however, it always comes out such error that i couldn't solve. I've already redownload and reinstalled matlab for three times,including 2019b and 2020a but it still fails.
I have sent this code to my friend's PC, and she can run it successfully. I also tried using the APP(neural net fitting) and the default datasets without modifying any parameters, it fails again. So, what's wrong??????
code:
clc;clear;
input = [0:0.1:1 ; 1:0.1:2]; % each column represent a sample
target = input(1,:).^2+input(2,:).^2;
net=feedforwardnet(10);
view(net);
net = train(net,input,target);
command error:
无法执行赋值,因为左侧的大小为 2×2,右侧的大小为 2×11。
出错 initnw>initialize_layer (line 176)
range(inputStart(j):inputStop(j),:) =
temp2((inputStart(j):inputStop(j))-inputStart(j)+1,:);
出错 initnw (line 101)
out1 = initialize_layer(in1,in2);
出错 initlay>initialize_network (line 155)
net = feval(initFcn,net,i);
出错 initlay (line 97)
out1 = initialize_network(in1);
出错 network/init (line 31)
net = feval(initFcn,net);
出错 network/configure (line 253)
net = init(net);
出错 nntraining.config (line 146)
net = configure(network(net),X,T);
出错 nntraining.setup>setupPerWorker (line 102)
[net,X,Xi,Ai,T,EW,Q,TS,err] = nntraining.config(net,X,Xi,Ai,T,EW,configNetEnable);
出错 nntraining.setup (line 77)
[net,data,tr,err] = setupPerWorker(net,trainFcn,X,Xi,Ai,T,EW,enableConfigure);
出错 network/train (line 335)
[net,data,tr,err] = nntraining.setup(net,net.trainFcn,X,Xi,Ai,T,EW,enableConfigure,isComposite);
出错 untitled4 (line 6)
net = train(net,input,target);
App error:

5 Commenti
Walter Roberson
il 16 Ago 2020
What shows up for
which -all repmat
Liuen Guan
il 16 Ago 2020
Walter Roberson
il 16 Ago 2020
dbstop at initnw 173
and run your code. When it stops at line 173, look at irange : it should be a 2 x 2 array.
now
dbstep
dbstep
which should take you to line 176. Examine the value of inputDelays(j) which should be 1. Examine the size of temp2 which should be a 2 x 2 array.
Now dbstep again to execute the line you were having problems with.If it works then the problem did not occur. If it does not work, then look at the size and values of all of the variables mentioned on the row to help figure out what the problem might be.
Liuen Guan
il 16 Ago 2020
Liuen Guan
il 16 Ago 2020
Risposte (0)
Categorie
Scopri di più su Deep Learning Toolbox in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
