Hello, I'm attempting to utilize lstm to categorize data but the validation loss Is Nan.
I reduced the learning rates to 1e-12 but I am still receiving Nan results.
Appreciate any guidance.
Best Regards,
options = trainingOptions("sgdm", ...
"MaxEpochs",400, ...
"InitialLearnRate",0.000000000001, ...
"Shuffle", 'never', ...
"Plots","training-progress",...
"ValidationData",{XValidation,YValidation},...
'ValidationFrequency',1);
%%
layers = [ ...
sequenceInputLayer(1)
bilstmLayer(100,"OutputMode","last")
fullyConnectedLayer(2)
softmaxLayer
classificationLayer];
% displaySequence(tones_cell{1}, label1{1})
net = trainNetwork(XTrain,labelTrain, layers, options )
YPred = classify(net,XTest);

댓글 수: 1

KSSV
KSSV 2022년 2월 7일
Increase the learning rate and see.

댓글을 달려면 로그인하십시오.

 채택된 답변

yanqi liu
yanqi liu 2022년 2월 8일

1 개 추천

yes,sir,may be add dropoutLayer、batchNormalizationLayer to the model

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

제품

릴리스

R2021a

질문:

2022년 2월 6일

댓글:

2022년 2월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by