inferno-pytorch / inferno

A utility library around PyTorch
Other
244 stars 41 forks source link

make GarbageCollection a default #191

Open DerThorsten opened 5 years ago

DerThorsten commented 5 years ago

we should make the behavior off the GarbageCollection callback default and make this callback obsolete. We should proidve an API like the following and have reasonable defaults:

trainer.garbage_collect(collect_every=(1, 'iteration'))

Power users can disable gc via

trainer.garbage_collect(collect_every='never')