Files
HuggingFace_transformer/transformers
Rémi Louf 022525b003 replace LambdaLR scheduler wrappers by function
Custom schedulers are currently initiated by wrapping Pytorch's LambdaLR
class and passing a method of the wrapping class to the __init__
function of LambdaLR. This approach is not appropriate for several
reasons:

1. one does not need to define a class when it only defines a
__init__() method;
2. instantiating the parent class by passing a method of the child class
creates a cyclical reference which leads to memory leaks. See issues #1742 and #1134.

In this commit we replace the wrapper classes with functions that
instantiate `LambdaLR` with a custom learning rate function. We use a
closure to specify the parameter of the latter. We also do a bit of
renaming within the function to explicit the behaviour and removed
docstrings that were subsequently not necessary.
2019-11-14 15:39:08 +01:00
..
2019-10-24 21:43:28 +00:00
2019-10-09 11:07:43 +02:00
2019-11-05 13:31:58 -05:00
2019-10-03 22:29:03 -07:00
2019-10-29 17:10:20 +01:00
2019-11-06 14:03:47 -05:00
2019-11-05 13:31:58 -05:00
2019-10-11 16:05:30 -04:00
2019-11-04 17:19:15 +00:00
2019-11-05 19:06:12 -05:00
2019-11-05 13:31:58 -05:00
2019-10-22 14:12:33 -04:00