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

module 'tensorflow._api.v2.train' has no attribute 'AdamOptimizer' #192

Open
VijayaMalla opened this issue Sep 18, 2020 · 1 comment
Open

Comments

@VijayaMalla
Copy link

I am trying to run pix2pix.py and I got an error at line 540,
OLD : #tf.set_random_seed(a.seed)
NEW : tf.random.set_seed(a.seed)

after that when I run the command again, I am getting this error
Traceback (most recent call last):
File "pix2pix.py", line 805, in
main()
File "pix2pix.py", line 627, in main
examples = load_examples()
File "pix2pix.py", line 259, in load_examples
path_queue = tf.train.string_input_producer(input_paths, shuffle=a.mode == "train")
AttributeError: module 'tensorflow._api.v2.train' has no attribute 'string_input_producer'

I didn't make any changes, just following the steps at this pix2pix. Please HELP.

@Zoe861122
Copy link

maybe you can add this:

import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()

and at line 540 still use OLD : #tf.set_random_seed(a.seed)

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

2 participants