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

Training fails with tensor2tensor current version (1.9.0) #155

Open
Hugo-W opened this issue Oct 18, 2018 · 1 comment
Open

Training fails with tensor2tensor current version (1.9.0) #155

Hugo-W opened this issue Oct 18, 2018 · 1 comment

Comments

@Hugo-W
Copy link

Hugo-W commented Oct 18, 2018

The documentation mentioned

Tensor2Tensor version 1.6.6 or higher

Though, with tensor2tensor version 1.9.0, the following error occured when trying to train a new model:

Traceback (most recent call last):
  File "/home/hw2512/anaconda/envs/tensorflow/bin/g2p-seq2seq", line 11, in <module>
    load_entry_point('g2p-seq2seq==6.2.2a0', 'console_scripts', 'g2p-seq2seq')()
  File "/home/hw2512/anaconda/envs/tensorflow/lib/python2.7/site-packages/g2p_seq2seq-6.2.2a0-py2.7.egg/g2p_seq2seq/app.py", line 113, in main
    g2p_model.train()
  File "/home/hw2512/anaconda/envs/tensorflow/lib/python2.7/site-packages/g2p_seq2seq-6.2.2a0-py2.7.egg/g2p_seq2seq/g2p.py", line 259, in train
    execute_schedule(self.exp, self.params)
  File "/home/hw2512/anaconda/envs/tensorflow/lib/python2.7/site-packages/g2p_seq2seq-6.2.2a0-py2.7.egg/g2p_seq2seq/g2p.py", line 589, in execute_schedule
    getattr(exp, params.schedule)()
  File "/home/hw2512/anaconda/envs/tensorflow/lib/python2.7/site-packages/tensor2tensor/utils/trainer_lib.py", line 331, in continuous_train_and_eval
    self._eval_spec)
  File "/home/hw2512/anaconda/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/estimator/training.py", line 471, in train_and_evaluate
    return executor.run()
  File "/home/hw2512/anaconda/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/estimator/training.py", line 610, in run
    return self.run_local()
  File "/home/hw2512/anaconda/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/estimator/training.py", line 711, in run_local
    saving_listeners=saving_listeners)
  File "/home/hw2512/anaconda/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/estimator/estimator.py", line 356, in train
    loss = self._train_model(input_fn, hooks, saving_listeners)
  File "/home/hw2512/anaconda/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/estimator/estimator.py", line 1181, in _train_model
    return self._train_model_default(input_fn, hooks, saving_listeners)
  File "/home/hw2512/anaconda/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/estimator/estimator.py", line 1211, in _train_model_default
    features, labels, model_fn_lib.ModeKeys.TRAIN, self.config)
  File "/home/hw2512/anaconda/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/estimator/estimator.py", line 1169, in _call_model_fn
    model_fn_results = self._model_fn(features=features, **kwargs)
  File "/home/hw2512/anaconda/envs/tensorflow/lib/python2.7/site-packages/tensor2tensor/utils/t2t_model.py", line 1225, in wrapping_model_fn
    decode_hparams=decode_hparams)
  File "/home/hw2512/anaconda/envs/tensorflow/lib/python2.7/site-packages/tensor2tensor/utils/t2t_model.py", line 1322, in estimator_model_fn
    loss, num_async_replicas=num_async_replicas, use_tpu=use_tpu)
  File "/home/hw2512/anaconda/envs/tensorflow/lib/python2.7/site-packages/tensor2tensor/utils/t2t_model.py", line 1349, in estimator_spec_train
    if self._hparams.warm_start_from:
AttributeError: 'HParams' object has no attribute 'warm_start_from'

The interactive and classic decoding was working without error though.

The training error disappeared when I downgraded tensor2tensor to version 1.6.6.

@huangruizhe
Copy link

Got the same problem, and fixed in the same way. Thanks!

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