Replies: 1 comment 1 reply
-
Hey @Kajiih, I believe you need to declare the training argument as a |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello dear Flax community!
I wanted to add some regularization to a rather complex model involving a scanned function. The issue is that I am not sure how to add the static variable
training
inside the scan. I tried to add it in the carry but the value become traced and causes an error later. Is it ok to use the variable training that is defined out of the scope of the scanned function?It might not be the same problem but I am getting
nans
in literally every metrics since I added dropout to the model.Also, as far as my understanding goes, it is not related to this discussion (even though it helped me figure out a few things when using scan with dropout): #1253.
Beta Was this translation helpful? Give feedback.
All reactions