Question regarding an optimal number of epochs for an LSTM network

How to determine an optimal number of epochs?

Is it helpful to use any techniques to choose the optimal number of epochs in order to halt the training of Neural Networks at the right time?

You can use validation data and perform “early stopping”.