我正在尝试创建LSTM分类模型。代码正确编译,并且训练进度窗口打开。但是,几秒钟后(从0s开始的时间没有任何变化),一个弹出窗口显示了一个错误,指出:MATLAB遇到内部问题,需要关闭。
options =
TrainingOptionsADAM with properties:
GradientDecayFactor: 0.9000
SquaredGradientDecayFactor: 0.9990
Epsilon: 1.0000e-08
InitialLearnRate: 1.0000e-03
LearnRateScheduleSettings: [1×1 struct]
L2Regularization: 1.0000e-04
GradientThresholdMethod: 'l2norm'
GradientThreshold: 1
MaxEpochs: 100
MiniBatchSize: 27
Verbose: 1
VerboseFrequency: 50
ValidationData: []
ValidationFrequency: 50
ValidationPatience: 5
Shuffle: 'never'
CheckpointPath: ''
ExecutionEnvironment: 'cpu'
WorkerLoad: []
OutputFcn: []
Plots: 'training-progress'
SequenceLength: 'longest'
SequencePaddingValue: 0
| Epoch | Iteration | Time Elapsed | Mini-batch | Mini-batch |
Base Learning |
| | | (hh:mm:ss) | Accuracy | Loss |
Rate |
如果我在内部错误之前退出进程,则会显示以下错误
Warning: The following error was caught while executing 'onCleanup'
class destructor:
Invalid or deleted object.
Error in
nnet.internal.cnn.ui.TrainingPlotViewHG/set.TrainingErrorMessageVisible
(line 175)
this.TrainingErrorMessageText.Visible = iBooleanToStr(tf);
%#ok<MCSUP>
Error in
nnet.internal.cnn.ui.TrainingPlotPresenterWithDialog/
showOnlyTrainingErrorMessage (line 295)
this.TrainingPlotView.TrainingErrorMessageVisible = true;
Error in
nnet.internal.cnn.ui.TrainingPlotPresenterWithDialog/
displayTrainingErrorMessage (line 169)
this.showOnlyTrainingErrorMessage()
Error in nnet.internal.cnn.util.TrainingPlotReporter/finalizePlot (line
140)
this.TrainingPlotPresenter.displayTrainingErrorMessage();
Error in trainNetwork>iFinalizePlot (line 1038)
trainingPlotReporter.finalizePlot(errorState.ErrorOccurred);
Error in trainNetwork>@()iFinalizePlot(trainingPlotReporter,errorState)
(line 235)
cleanup = onCleanup(@()iFinalizePlot(trainingPlotReporter, errorState));
Error in onCleanup/delete (line 60)
h.task();
Error in trainNetwork>doTrainNetwork (line 159)
function [trainedNet, info] = doTrainNetwork(layersOrGraph, opts, X, Y)
Error in trainNetwork (line 152)
[trainedNet, info] = doTrainNetwork(layersOrGraph, opts, X, Y);
Error in Model (line 60)
net = trainNetwork(data, labels, layers, options);
In trainNetwork>doTrainNetwork (line 159)
In trainNetwork (line 152)
In Model (line 60)
Operation terminated by user during
nnet.internal.cnnhost.lstmForwardReturnLast (line 50)
In nnet.internal.cnn.layer.util.BiLSTMHostReturnLastStrategy/forward
(line 13)
[Yf, Cf, Gf] = nnet.internal.cnnhost.lstmForwardReturnLast(X,
Wf, Rf, bf, c0f, y0f);
In nnet.internal.cnn.layer.BiLSTM/forward (line 138)
[Z, memory] = this.ExecutionStrategy.forward( ...
In
nnet.internal.cnn.SeriesNetwork>@()
this.Layers{currentLayer}.forward(layerOutputs{currentLayer-1}) (line
258)
@() this.Layers{currentLayer}.forward( ...
In nnet.internal.cnn.util.executeWithStagedGPUOOMRecovery (line 11)
[ varargout{1:nOutputs} ] = computeFun();
In nnet.internal.cnn.SeriesNetwork>iExecuteWithStagedGPUOOMRecovery
(line 511)
[varargout{1:nargout}] =
nnet.internal.cnn.util.executeWithStagedGPUOOMRecovery(varargin{:});
In nnet.internal.cnn.SeriesNetwork/computeGradientsForTraining (line
256)
[layerOutputs{currentLayer}, memory{currentLayer}] = ...
In nnet.internal.cnn.Trainer/computeGradients (line 183)
[gradients, predictions, states] =
net.computeGradientsForTraining(X, Y, needsStatefulTraining,
propagateState);
In nnet.internal.cnn.Trainer/train (line 83)
[gradients, predictions, states] =
this.computeGradients(net, X, response, needsStatefulTraining,
propagateState);
In trainNetwork>doTrainNetwork (line 251)
trainedNet = trainer.train(trainedNet, trainingDispatcher);
In trainNetwork (line 152)
[trainedNet, info] = doTrainNetwork(layersOrGraph, opts, X, Y);
In Model (line 60)
net = trainNetwork(data, labels, layers, options);
Error using matlab.internal.language.introspective.errorDocCallback
(line 5)
File
'nnet.internal.cnn.ui.TrainingPlotViewHG
/set.TrainingErrorMessageVisible'
not found.
Error in web (line 62)
evalin('caller', html_file(8:end));}