Skip to content
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

Wrong in tf.get_collection #1

Open
CuriousCat-7 opened this issue Feb 20, 2019 · 0 comments
Open

Wrong in tf.get_collection #1

CuriousCat-7 opened this issue Feb 20, 2019 · 0 comments

Comments

@CuriousCat-7
Copy link

dvars = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, "discriminator")

In offical doc, tf.get_collection use re.match. So, the code dvars = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, "discriminator")
will get dvars = "discriminator/", "discriminator_pair/", "discriminator_xx/", "discriminator_zz/"

No need to write train_disc_op = opt.minimize(disc_loss, var_list=dvars + dvars_xz + dvars_xx + dvars_zz) but train_disc_op = opt.minimize(disc_loss, var_list=dvars). Or you should change the name of "discriminator" to "discriminator_orig"

I know it will not cause any problems in the code, but it misleads others

Best, regard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant