-
Notifications
You must be signed in to change notification settings - Fork 1
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
Critic marked as non-trainable #1
Comments
Interesting, thanks for doing that! Feel free to open a PR if you'd like to contribute this back. I'll have to look more closely. Looking at the comments: (this builds
(this runs training and makes use of
My gut check is that only That said, if the critic weights were truly fixed, I would expect the model to be totally incapable of learning anything which doesn't seem to be the case. |
Woah, really appreciate you answering so quickly. And yeah, what you said makes sense to me. This is pretty much the first ML thing I try, so I'm trying to make sense out of the details. Your last statement is what I thought too. I think I just need to figure out how to correctly freeze the critic only for the gan model. I think with what I'm doing right now I'm basically freezing both the critic model that gets used within the gan, and the critic model itself. So I sense some kind of unwanted side effect here. I'll dig around and post any findings here. |
Cross posting from your awesome Medium article here just for more awareness.
Maybe I'm mistaken, but in the code the critic is set as non-trainable with
critic.trainable = false
. I've been trying to port this to TensorFlow.js, and when running the training for the first time, I'm getting an error from the critic optimizer:If I just remove the line that sets it as non-trainable, the model starts training fine. I re-looked at the tutorial you linked to in your article, and he seems to suggest that the critic is pre-trained, and that's why it's marked as non-trainable. But if we're doing this from scratch, we should just set it to trainable the first time around, correct? Since we actually train the critic every epoch, we even have the
discriminatorUpdateMultiplier
variable to determine how many times to update the critic.What am I missing?
The text was updated successfully, but these errors were encountered: