Adding support for oprimizer adaptive lr within trainer
Description
Added optimizer scheduler to trainer. Added it to the simple_autoenc game and will remove it from there if the PR is positively reviewed.
Motivation and Context
Adaptive lr can be useful in various training setups. It could be also implemented as callback and accessing the optimizer state from there (each callback gets a reference to the trainer from the parent class when calling on_train_begin.
How Has This Been Tested?
Implemented a multiplicative scheduler in simpler_autoenc and launched
python -m egg.zoo.simple_autoenc.train --vocab_size=3 --n_features=6 --n_epoch=2 --max_len=3 --batch_size=32 --random_seed=21 --lr=1
Adding support for oprimizer adaptive lr within trainer
Description
Added optimizer scheduler to trainer. Added it to the simple_autoenc game and will remove it from there if the PR is positively reviewed.
Motivation and Context
Adaptive lr can be useful in various training setups. It could be also implemented as callback and accessing the optimizer state from there (each callback gets a reference to the trainer from the parent class when calling
on_train_begin
.How Has This Been Tested?
Implemented a multiplicative scheduler in simpler_autoenc and launched
python -m egg.zoo.simple_autoenc.train --vocab_size=3 --n_features=6 --n_epoch=2 --max_len=3 --batch_size=32 --random_seed=21 --lr=1