eisen-ai / eisen-core

Core functionality of Eisen
MIT License
41 stars 10 forks source link

workflow is taking up more memory and time than it needs to #36

Open dasturge opened 4 years ago

dasturge commented 4 years ago

https://github.com/eisen-ai/eisen-core/blob/a265a06c7eb631fb9c95d1fe1f2917b68e422323/eisen/utils/workflows/workflows.py#L200-L202

This is more memory and computationally efficient than sending each loss back individually:

sum([loss for loss_outputs in losses for loss in loss_outputs.values()]).backward()