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

Issue running pip install tensor2tensor && t2t-trainer #190

Closed
FrancescoLimoni opened this issue Apr 3, 2020 · 4 comments
Closed

Issue running pip install tensor2tensor && t2t-trainer #190

FrancescoLimoni opened this issue Apr 3, 2020 · 4 comments

Comments

@FrancescoLimoni
Copy link

Hi,

Running the script tensor2tensor && t2t-trainer I receive this error.
I already tried to run it as pip and pip3 but nothing changed
Any idea?

Thanks
Francesco

Traceback (most recent call last):
File "/usr/local/bin/t2t-trainer", line 32, in
tf.app.run()
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/usr/local/lib/python3.7/site-packages/absl/app.py", line 299, in run
_run_main(main, args)
File "/usr/local/lib/python3.7/site-packages/absl/app.py", line 250, in _run_main
sys.exit(main(argv))
File "/usr/local/bin/t2t-trainer", line 28, in main
t2t_trainer.main(argv)
File "/usr/local/lib/python3.7/site-packages/tensor2tensor/bin/t2t_trainer.py", line 349, in main
generate_data()
File "/usr/local/lib/python3.7/site-packages/tensor2tensor/bin/t2t_trainer.py", line 245, in generate_data
registry.problem(problem_name).generate_data(data_dir, tmp_dir)
File "/usr/local/lib/python3.7/site-packages/tensor2tensor/data_generators/image_utils.py", line 193, in generate_data
self.dev_filepaths(data_dir, self.dev_shards, shuffled=False))
File "/usr/local/lib/python3.7/site-packages/tensor2tensor/data_generators/generator_utils.py", line 471, in generate_dataset_and_shuffle
generate_files(train_gen, train_paths)
File "/usr/local/lib/python3.7/site-packages/tensor2tensor/data_generators/generator_utils.py", line 154, in generate_files
for case in generator:
File "/usr/local/lib/python3.7/site-packages/tensor2tensor/data_generators/image_utils.py", line 234, in image_generator
for (enc_image, label) in zip(encode_images_as_png(images), labels):
File "/usr/local/lib/python3.7/site-packages/tensor2tensor/data_generators/image_utils.py", line 198, in encode_images_as_png
if tf.contrib.eager.in_eager_mode():
AttributeError: module 'tensorflow.contrib.eager' has no attribute 'in_eager_mode'

@nshmyrev
Copy link
Contributor

nshmyrev commented Apr 3, 2020

Same as #155, you need specific tensorflow and tensor2tensor version. Overall, you might try something newer like https://github.com/Kyubyong/g2p or https://github.com/hajix/G2P

@nshmyrev nshmyrev closed this as completed Apr 3, 2020
@FrancescoLimoni
Copy link
Author

@nshmyrev Thanks for the references.
Unfortunately my error persist even after downgraded tensor2tensor to version 1.6.6
Do you have any idea why?

@nshmyrev
Copy link
Contributor

nshmyrev commented Apr 3, 2020

you need to downgrade both tensorflow and tensor2tensor

@xianyu-wanga
Copy link

hello,have you solve the problem?I have meet the same question

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

No branches or pull requests

3 participants