After converting audio data set from 16 bit to 8 bit I cannot start Deep Learning Model training, every time training stopped stating: training loss is NaN.

2 views (last 30 days)
Hello Matlab team,
I am trying to train my network, with lowering BitsPerSample to 8 before it was 16 BitsPerSample. Every time i try to start training model it throw warning (given below) and terminates.
I try it with different sample rate but it gives same error everytime. I tried to change my layer structure, changing InitialLearnRate',0.001 but still i am getting same warning.
Warning: Training stopped at iteration 1 because training loss is NaN. Predictions using the output network might contain NaN values.
Model:
layers = [ ...
sequenceInputLayer(size(trainingFeatures{1},1))
lstmLayer(100,"OutputMode","sequence")
dropoutLayer(0.1)
lstmLayer(100,"OutputMode","last")
fullyConnectedLayer(5)
softmaxLayer
classificationLayer];
miniBatchSize = 30;
validationFrequency = floor(numel(trainingFeatures)/miniBatchSize);
options = trainingOptions("adam", ...
"MaxEpochs",100, ...
"MiniBatchSize",miniBatchSize, ...
"Plots","training-progress", ...
"Verbose",false, ...
"Shuffle","every-epoch", ...
"LearnRateSchedule","piecewise", ...
"LearnRateDropFactor",0.1, ...
"LearnRateDropPeriod",20,...
'InitialLearnRate',0.001,...
'ValidationData',{validationFeatures,adsValidation.Labels}, ...
'ValidationFrequency',validationFrequency);
Regards,
Arslan
  2 Comments
Jeffrey Clark
Jeffrey Clark on 5 Oct 2022
Edited: Jeffrey Clark on 5 Oct 2022
@Arslan Munim, did you check that your conversion from 16 to 8 bits didn't result in erroneous audio data?
Also leave message with the author of what you downloaded from the file exchange; see @David Willingham
Arslan Munim
Arslan Munim on 5 Oct 2022
Thanks for you reply, Yes I have visualized data set using audio data set and also go through the audio set values its look quite ok to me, I also try converting data from multiple different ways but still i cannot start training always saying Training stopped with:
Warning: Training stopped at iteration 1 because training loss is NaN. Predictions using the output network might contain NaN values.
I didn't really get the second part of your reply, but as far as data set is concerned it is my personal data set.

Sign in to comment.

Answers (0)

Categories

Find more on AI for Audio in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!