MathGaron / pytorch_toolbox

Boiler plate code for pytorch. Train/Validation loops, visualization etc. For research.
MIT License
10 stars 3 forks source link

Gradient Clipping blow up #23

Closed jacenfox closed 5 years ago

jacenfox commented 6 years ago

https://github.com/MathGaron/pytorch_toolbox/blob/6e6c88f8e3eb7259763d7215cd9c3e614d065507/pytorch_toolbox/train_loop.py#L147

Be careful about this operation, it can blow up your training, I don't know when, but it doesn't work on my LSTM network. Maybe it's better to set up the threshold manually.

MathGaron commented 6 years ago

It is not set by default! and for the value, I am not convinced that it is useful at all to let the user chose a value? 1 seems pretty logical, I want to be sure that it is useful to set it up to other values before adding more hyperparameters!