Closed FrancescoLimoni closed 4 years ago
Same as https://github.com/cmusphinx/g2p-seq2seq/issues/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 Thanks for the references. Unfortunately my error persist even after downgraded tensor2tensor to version 1.6.6 Do you have any idea why?
you need to downgrade both tensorflow and tensor2tensor
hello,have you solve the problem?I have meet the same question
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'