我正在使用 narxnet 在基于 linux 的 HPC cpus 中進行培訓。因為我已經在 Windows 桌面上運行了相同的代碼。為了獲得更多隱藏層,我試圖在 HPC 中運行。
我看到以下錯誤:在 .e 檔案中
{Error using appwindowfactory
This functionality is not supported under the -nojvm startup option.
Error in matlab.ui.internal.uifigureImpl (line 80)
window = appwindowfactory('WindowStyle','normal',...
Error in uifigure (line 26)
window = matlab.ui.internal.uifigureImpl(varargin{:});
Error in nnet.guis.StandaloneTrainToolView (line 115)
this.Figure = uifigure('Visible', 'off',...
Error in nnet.guis.NNTrainToolFactory/createStandaloneView (line 12)
view = nnet.guis.StandaloneTrainToolView(this);
Error in nnet.guis.StandaloneTrainToolPresenter (line 32)
this.StandaloneTrainToolView = this.TrainToolFactory.createStandaloneView();
Error in nnet.guis.NNTrainToolFactory/createStandalonePresenter (line 8)
presenter = nnet.guis.StandaloneTrainToolPresenter(this);
Error in nnet.train.TrainToolFeedback/startImpl (line 70)
this.TrainToolPresenter = this.TrainToolFactory.createStandalonePresenter();
Error in nnet.train.FeedbackHandler/start (line 18)
this.startImpl(useSPMD,data,net,tr,options,status);
Error in nnet.train.MultiFeedback/startImpl (line 29)
this.Handlers{i}.start(useSPMD,data,net,tr,options,status);
Error in nnet.train.FeedbackHandler/start (line 18)
this.startImpl(useSPMD,data,net,tr,options,status);
Error in nnet.train.trainNetwork>trainNetworkInMainThread (line 42)
feedback.start(false,rawData,archNet,worker.tr,calcLib.options,worker.status);
Error in nnet.train.trainNetwork (line 27)
[archNet,tr] = trainNetworkInMainThread(archNet,rawData,calcLib,calcNet,tr,feedback,localFcns);
Error in trainscg>train_network (line 145)
[archNet,tr] = nnet.train.trainNetwork(archNet,rawData,calcLib,calcNet,tr,localfunctions);
Error in trainscg (line 55)
[out1,out2] = train_network(varargin{2:end});
Error in network/train (line 380)
[net,tr] = feval(trainFcn,'apply',net,data,calcLib,calcNet,tr);
}
有問題的代碼行
% Create a NARX network. Define the input delays, feedback delays, and size of the hidden layers.
net = narxnet(1:4,1:4,4);
% Prepare the time series data using preparets. This function automatically shifts input and target time series by the number of steps needed to fill the initial input and layer delay states.
[Xs,Xi,Ai,Ts] = preparets(net,Xcell,{},Ycell);
% Train the NARX network. The train function trains the network in an open loop (series-parallel architecture), % including the validation and testing steps.
net.trainFcn = 'trainscg' % to avoid the memory issue BackpropJacobi
net = train(net,Xs,Ts,Xi,Ai);
% view(net)
% Calculate the network output Y, final input states Xf, and final layer states Af of the open-loop network from the network input Xs, initial input states Xi, and initial layer states Ai.
[Y,Xf,Af] = net(Xs,Xi,Ai);
我確實評論了視圖以避免任何 ui 布局
uj5u.com熱心網友回復:
通過獲取網路物件后
net = narxnet(1:4,1:4,4);
你能在網路物件上檢查這個屬性嗎?
net.trainParam.showWindow
如果這是真的,應該會顯示一個訓練視窗 nntraintool,這可能會導致問題。
另外如果你的實際代碼比較復雜,matlab可能會在某些步驟中重新設定這個選項,所以你需要在正確的位置更改選項。
uj5u.com熱心網友回復:
我還有一個關于使用 bigg 資料運行 narx 的問題。我嘗試增加隱藏大小,以獲得更好的模型。
似乎 300 是允許的隱藏單元的上限——記憶體錯誤。所以對于 1000,它明確表示不。
與 narxnet 的:
net = narxnet(1:25,1:25,1000);
我收到此錯誤 .e 檔案
{Error using zeros
Requested 1000x54373200 (405.1GB) array exceeds maximum array size preference
(377.4GB). This might cause MATLAB to become unresponsive.
Error in nnet.internal.configure.inputWeight (line 25)
net.IW{i,j} = zeros(newSize);
Error in nnet.internal.configure.input (line 42)
net = nnet.internal.configure.inputWeight(net,j,i,x);
Error in network/configure (line 244)
net = nnet.internal.configure.input(net,i,X{i});
Error in preparets (line 302)
net = configure(net,'input',xx(i,:),i);
}
大小為 600 時出現一些記憶體錯誤,如何修復它以便能夠將 NARX 用于大資料:
net = narxnet(1:25,1:25,600);
我們得到以下
{Out of memory.
Error in normr (line 27)
xi(~isfinite(xi)) = 0;
Error in randnr>new_value_from_rows_cols (line 152)
x = normr(rands(rows,cols));
Error in randnr (line 98)
out1 = new_value_from_rows_cols(in1,in2);
Error in initnw>calcnw (line 287)
wDir = randnr(s,r);
Error in initnw>initialize_layer (line 212)
[w,b] = calcnw(range,net.layers{i}.size,active);
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 31)
net = feval(initFcn,net);
Error in network/configure (line 253)
net = init(net);
Error in preparets (line 302)
net = configure(net,'input',xx(i,:),i);
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/534019.html
