I use this web(pytorch-classification/train.py at 5107de352cade326e7aacd44bf8d625b7055fd4e · dusty-nv/pytorch-classification · GitHub)to use train.py. I want to add the early stopping method to train.py. How to do it?
You can terminate the process once it reaches the expected accuracy directly.
Then use the
--resume flag if you want to resume the training job again.
I am very sorry to say. Would it be convenient for you to show or write the early_stopping code with train.py to me?
Or how to use dropout method on train.py?
Dropout should be added into the model directly.
Here are some related discussion for your reference:
I use this URL (jetson-inference/pytorch-collect.md at master · dusty-nv/jetson-inference · GitHub) to go to the training step. How can I change the weight decay of train.py (pytorch-classification/train.py at 5107de352cade326e7aacd44bf8d625b7055fd4e · dusty-nv/pytorch-classification · GitHub) without affecting the bias value?
The training weight is updated via back propagation with the loss value automatically.
If you want to freeze the bias value, please try to implement a custom updater or set the trainable tag into OFF.