manigalati / usad

Other
206 stars 58 forks source link

Fix memory usage during model validation #8

Closed finloop closed 1 year ago

finloop commented 2 years ago

What was the problem: I couldn't train the model on my laptop with 4GB of VRAM.

What I have done: I disabled gradient calculation during model validation (gradients were stored in VRAM). Now, training full model as is (USAD.ipynb) takes about 1.8 GB of VRAM.

This PR should fix #6 .