-
Notifications
You must be signed in to change notification settings - Fork 19.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Re-enable multi-output logs #19219
Comments
+1 for this I have also filed the issue at #18993 |
I'm having the same restriction using GAN models, which have several loss values... |
The recommendation is to pass model.compile(
optimizer=keras.optimizers.RMSprop(1e-3),
loss={
"priority": keras.losses.BinaryCrossentropy(from_logits=True),
"department": keras.losses.CategoricalCrossentropy(from_logits=True),
},
metrics={
"priority": [keras.metrics.BinaryCrossentropy(from_logits=True)],
"department": [keras.metrics.CategoricalCrossentropy(from_logits=True)],
},
loss_weights={"priority": 1.0, "department": 0.2},
) |
@fchollet Epoch 1/2
40/40 ━ 1s 12ms/step - loss: ?, priority_loss: ?, department_loss: ? but in keras 3 Epoch 1/2
40/40 ━ 1s 12ms/step - loss: ? So, it's not about the metrics but loss scores of a multi output model. And it seems missing in the log in keras 3. We found this unexpected, coz sometimes we prefer to monitor target loss score using callback to reduce lr or saving checkpoint, etc. As this ticket is closed, I guess this is fixed but I've just tried a sample code with keras-nightly (3.2.0.dev2024040203), it's same as before. model.compile(
optimizer=keras.optimizers.RMSprop(1e-3),
loss={
"priority": keras.losses.BinaryCrossentropy(from_logits=True),
"department": keras.losses.CategoricalCrossentropy(from_logits=True),
},
loss_weights={"priority": 0.1, "department": 0.2},
)
Epoch 1/2
40/40 ━━━━━━━━━━━━━━━━━━━━ 5s 48ms/step - loss: 0.6244
Epoch 2/2
40/40 ━━━━━━━━━━━━━━━━━━━━ 2s 44ms/step - loss: 0.6285 |
If a model is configured for multi-output, in keras 2, we can get the log message for all corresponding outputs. But in keras 3, it is removed and only shows the summarized log message. Unlike mult-class classification, returning log message for mult-output sounds more natural.
in keras 2
in keras 3
Posted as a bug #19159, but it turned out that it was intentionally removed.
The text was updated successfully, but these errors were encountered: