Stopping LSTM NN Training on RMSE or Loss criteria

6 次查看(过去 30 天)
Hello all,
Below the question in short, thereafter I will give more details about the particulair question.
Is there a possibility to stop the LSTM NN training when a certain performance criteria is met? See the attached picture with the training performance to get the idea why I'am looking for options.
E.g: at certain RMSE or loss.
If you have other idea's or options, please share them :)
More detail:
I am training a LSTM NN with 100 hidden neurons. My dataset contains 750 experiments with 25 features, each experiment represents one stroke of a machine forming metal. I'am studying one experiment at a time (batch size 63xx), this gives me most stable performance.
I used padding to get each experiment the same length. Learning rate is set fixed at 0.01.

回答(1 个)

Jayanti
Jayanti 2024-12-17
Hi koen,
You can stop the training of an LSTM neural network in MATLAB by defining a custom stopping criteria.
Please refer to the following steps to implement custom stopping criteria
  1. Create a function that checks the training loss. If the loss is below a specified threshold, the function returns true, signaling the training process to stop.
  2. Use the trainingOptions function to specify the training parameters, including the custom output function. Just pass this custom function handle to the "OutputFcn" name-value pair argument of trainingOptions.
This function will be invoked at the start, during, and at the end of training.  Training will stop when the OutputFcn returns true.
Please refer to the following documentation link for your reference:
Hope this is useful!

类别

Help CenterFile Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息

产品


版本

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by