Tensor2tensor: define my own hparams set but encounter problem with the new updated version

Created on 4 May 2018  Â·  3Comments  Â·  Source: tensorflow/tensor2tensor

Hi I have no problem adding my own hparams set before with the older version. But when I want to train my model again, with the new version, I encountered the following problem: File "/usr/local/lib/python2.7/dist-packages/tensor2tensor/bin/t2t_trainer.py", line 294, in save_metadata
f.write(hparams.to_json(indent=0, sort_keys=True))
TypeError: to_json() got an unexpected keyword argument 'indent'

Traceback (most recent call last):
  File "/usr/local/bin/t2t-trainer", line 32, in <module>
    tf.app.run()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "/usr/local/bin/t2t-trainer", line 28, in main
    t2t_trainer.main(argv)
  File "/usr/local/lib/python2.7/dist-packages/tensor2tensor/bin/t2t_trainer.py", line 352, in main
    save_metadata(hparams)
  File "/usr/local/lib/python2.7/dist-packages/tensor2tensor/bin/t2t_trainer.py", line 294, in save_metadata
    f.write(hparams.to_json(indent=0, sort_keys=True))
TypeError: to_json() got an unexpected keyword argument 'indent'

…

question

Most helpful comment

With T2T 1.6.0 and higher, you need Tensorflow 1.5.0 or higher.

All 3 comments

With T2T 1.6.0 and higher, you need Tensorflow 1.5.0 or higher.

Thanks @martinpopel!

well job

Was this page helpful?
0 / 5 - 0 ratings