Skip to content

Minimum working example of training hyperprior; Weights not updating #138

Answered by jonaballe
alexarmstrongvi asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, you are experiencing a bug in older TF releases. tf.keras.Model classes didn't collect trainable variables from all nested objects that inherit from tf.Module, only from ones that inherit from tf.keras.layers.Layer. Distribution objects would fall in this category. This was fixed in a later TF version. I think it was fixed in 2.5. I'd recommend using the latest version (2.8; 2.9 should probably be released end of this week). If that's not possible, there is a workaround, check out this commit.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@alexarmstrongvi
Comment options

Answer selected by alexarmstrongvi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants