add garbage collection on OOM error in pretraining
add garbage collection on OOM error in pretraining

The structure of the network causes heavy memory fragmentation which
usually results in an OOM error sooner or later. We garbage collect on
these now to force the pytorch allocator to release caches which should
resolve the issue.

mittagessen/kraken,mittagessen/kraken,mittagessen/kraken,mittagessen/kraken