support for dictionary-type loss functions without explicitly declaring None
#20243
Labels
stat:contributions welcome
A pull request to fix this issue would be welcome.
type:feature
The user is asking for a new feature.
In previous versions of Keras, when providing a loss function as a dictionary for models with multiple outputs, the compileLoss function would automatically assign a default value for outputs without a defined loss. The relevant code was:
However, in the latest version, flat_losses is now simply:
flat_losses = tree.flatten(loss)
Is there a way to reintroduce support for dictionary-type loss functions without explicitly declaring None for undefined losses? This change reduces flexibility in using dictionary-based loss definitions.
The text was updated successfully, but these errors were encountered: