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

AttributeError: 'HParams' object has no attribute 'input_modality' tensorflow 1.13 and python 3.6 #170

Closed
cindy951357 opened this issue Feb 4, 2019 · 1 comment

Comments

@cindy951357
Copy link

g2p-seq2seq: 6.2.2a0
python: 3.6.5
tensorflow: 1.13
tensor2tensor: 1.12

I run this on my Mac:

g2p-seq2seq --model_dir=/Users/cindy/Documents/pythonworkspace/sphinxenv/g2p-seq2seq-model-6.2-cmudict-nostress --interactive

Then I get:

Traceback (most recent call last):
File "/usr/local/bin/g2p-seq2seq", line 11, in
load_entry_point('g2p-seq2seq==6.2.2a0', 'console_scripts', 'g2p-seq2seq')()
File "/usr/local/lib/python3.6/site-packages/g2p_seq2seq-6.2.2a0-py3.6.egg/g2p_seq2seq/app.py", line 123, in main
g2p_model.interactive()
File "/usr/local/lib/python3.6/site-packages/g2p_seq2seq-6.2.2a0-py3.6.egg/g2p_seq2seq/g2p.py", line 264, in interactive
self.__prepare_interactive_model()
File "/usr/local/lib/python3.6/site-packages/g2p_seq2seq-6.2.2a0-py3.6.egg/g2p_seq2seq/g2p.py", line 171, in __prepare_interactive_model
input_fn, estimator_lib.model_fn_lib.ModeKeys.PREDICT)
File "/usr/local/lib/python3.6/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1026, in _get_features_from_input_fn
result = self._call_input_fn(input_fn, mode)
File "/usr/local/lib/python3.6/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1138, in _call_input_fn
return input_fn(**kwargs)
File "/usr/local/lib/python3.6/site-packages/g2p_seq2seq-6.2.2a0-py3.6.egg/g2p_seq2seq/g2p.py", line 140, in input_fn
self.__interactive_input_fn())
File "/usr/local/lib/python3.6/site-packages/tensor2tensor-1.12.0-py3.6.egg/tensor2tensor/utils/decoding.py", line 553, in make_input_fn_from_generator
first_ex = six.next(gen)
File "/usr/local/lib/python3.6/site-packages/g2p_seq2seq-6.2.2a0-py3.6.egg/g2p_seq2seq/g2p.py", line 233, in __interactive_input_fn
has_input = "inputs" in p_hparams.input_modality
AttributeError: 'HParams' object has no attribute 'input_modality'

What went wrong? Thanks!

@nshmyrev
Copy link
Contributor

nshmyrev commented Apr 3, 2020

Same as #155. You need specific tensorflow and tensor2tensor versions

@nshmyrev nshmyrev closed this as completed Apr 3, 2020
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

2 participants