OHDSI / DeepPatientLevelPrediction

An R package for performing patient level prediction using deep learning in an observational database in the OMOP Common Data Model.
https://ohdsi.github.io/DeepPatientLevelPrediction
10 stars 4 forks source link

Add gradient accumulation for batches. #111

Closed egillax closed 3 months ago

egillax commented 4 months ago

By summing the gradients for a number of accumulation_steps before calling backward we can use lower batch sizes to reduce memory when otherwise it would run out of memory.

This should be pretty trivial to implement.

egillax commented 3 months ago

Fixed by #113