Open dasturge opened 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()
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: