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

ValueError: No variables to optimize #48

Open
RichardChen123 opened this issue Aug 1, 2022 · 0 comments
Open

ValueError: No variables to optimize #48

RichardChen123 opened this issue Aug 1, 2022 · 0 comments

Comments

@RichardChen123
Copy link

I'm trying to run the command given in the readme to train the DAGAN. At first, I had to fix some compatibility issues between tensorflow versions 1.x and 2.9.1 such as tf_slim instead of tf.contrib and using keras layers. It compiles now, but during runtime, I get the error "No variables to optimize" in the train() method of dagan_networks_wgan.py on the following line:
opt_ops["g_opt_op"] = opts["g_opt"].minimize(losses["g_losses"],
var_list=self.g.variables,
colocate_gradients_with_ops=True)

It seems like there are no variables in the graph during the first time the train function is called? Has anyone gotten this to work in recent tensorflow versions?

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