Logging loss with multiple objective functions
Author: arunppsgCreated Jul 14, 2023Updated Sep 9, 2026
By default, ModularTorchModel logs only the overall loss. An utility to log individual loss values will be useful.
Example: In GroverPretrain, the loss consists of three components - functional group loss, atom vocab prediction loss and bond vocab prediction loss but we only return the overall loss.
Some ideas:
- we can pass
log_frequencyargument and log values directly inGroverPretrainLoss - Have
GroverPretrainLossreturn a dictionary containing overall loss and other losses
Source: deepchem/deepchem