-
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I dont think we can access the "updates" but at least the weights we can access: |
Beta Was this translation helpful? Give feedback.
-
Do get access to gradients, you have to write a custom https://keras.io/guides/custom_train_step_in_jax/ Custom callbacks don't have access to gradients by default. An alternative can also be to write a custom optimizer, since optimizers have access to gradients. |
Beta Was this translation helpful? Give feedback.
Do get access to gradients, you have to write a custom
train_step()
for your model (you can still usefit()
). Like this:https://keras.io/guides/custom_train_step_in_jax/
https://keras.io/guides/custom_train_step_in_tensorflow/
https://keras.io/guides/custom_train_step_in_torch/
Custom callbacks don't have access to gradients by default.
An alternative can also be to write a custom optimizer, since optimizers have access to gradients.