Add the functionality of setting config['training']['loss_type'] as a list of loss_type string with the new configuration of config['training']['loss_weight'] to indicate the corresponding weight for each loss function. In this way, the combined loss is easier to implement than manually define. This code is also back compatible with previous style.
An example of config is
config.training.loss_type = ['DiceLoss', 'CrossEntropyLoss']
config.training.loss_weight = [1., 1.]
Add the functionality of setting config['training']['loss_type'] as a list of loss_type string with the new configuration of config['training']['loss_weight'] to indicate the corresponding weight for each loss function. In this way, the combined loss is easier to implement than manually define. This code is also back compatible with previous style.
An example of config is config.training.loss_type = ['DiceLoss', 'CrossEntropyLoss'] config.training.loss_weight = [1., 1.]