A thing I hear sometimes: "what if my loss doesn't match the signature loss = fn(y_true, y_pred)?" This is not a requirement in Keras -- it's only the default setting. If you have a loss with multiple inputs/targets, here are your options, in order of preference: (a thread)
-
-
3. Write a custom training loop from scratch. Guide: https://keras.io/guides/writing_a_training_loop_from_scratch/ … Remember that Keras defaults are only meant to cover the most common workflows -- for anything else, you have a range of increasingly advanced options. We call it "progressive disclosure of complexity"
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
How do I modify train_step if I need to handle a validation dataset? Do I need to write the full training loop from scratch?
-
You override test_step too
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.