BloodAxe / pytorch-toolbelt

PyTorch extensions for fast R&D prototyping and Kaggle farming
MIT License
1.52k stars 122 forks source link

where is that old attribute JointLoss, what's the name of it now? #91

Closed lucas2606-rs closed 1 year ago

lucas2606-rs commented 1 year ago

🐛 Bug

To Reproduce

Steps to reproduce the behavior:

1. 1. 1.

Expected behavior

Environment

Additional context

BloodAxe commented 1 year ago

It was removed in recent release. The reasoning behind this action is the following: Combining multiple losses in a hard coded way as JointLoss suggested is a wrong design and what you should be doing instead is to leverage some configuration based system to define what losses you want to have, their weights and what input/output keys should go in. At the moment of writing, JointLoss looked like a good idea, however after years of building pytorch proficiency it became clear to me that this class is rather a shortcut than a long term solution. So it was dropped. If you really want to have it I suggest you to copy-paste it's implementation from the past releases.