tensor2tensor
tensor2tensor copied to clipboard
No module named tensor2tensor
Description
I installed tensor2tensor using: pip install tensor2tensor[tensorflow_gpu], I can run commands in the terminal like t2t-trainer, t2t-decoder,... however when I try to import the library in a python script I get this error
Traceback (most recent call last):
File "
Environment information
OS: ubuntu 18.04
$ pip freeze | grep tensor mesh-tensorflow==0.0.5 tensor2tensor==1.13.4 tensorboard==1.14.0 tensorflow-datasets==1.1.0 tensorflow-estimator==1.14.0 tensorflow-gpu==1.14.0 tensorflow-metadata==0.14.0 tensorflow-probability==0.7.0
$ python -V Python 2.7.12
Error logs:
Traceback (most recent call last):
File "
hey can you try import something like:
from tensor2tensor.layers import common_layers
Traceback (most recent call last):
File "
hi, I suppose it might be path error, you might want to locate the tensor2tensor folder and add it to your path via export. maybe the t2t guys know better.
The same error here; and I can't find t2t folder either, because it's a script and not a command...
hello so here I try to train a model of mask r cnn on my own give with the command python D:\Projet\CV-CommonTools\model_main.py / --model_dir training / --pipeline_config_path training\mask_rcnn_inception_v2.config / --num_train_steps 60000 / --sample_1_of_n_eval_examples=0 / --alsologtostderr
but i get the following error
Traceback (most recent call last):
File "D:\Projet\model_main.py", line 110, in <module>
tf.app.run()
File "C:\Users\Ibrahim\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "C:\Users\Ibrahim\AppData\Local\Programs\Python\Python36\lib\site-packages\absl\app.py", line 299, in run
_run_main(main, args)
File "C:\Users\Ibrahim\AppData\Local\Programs\Python\Python36\lib\site-packages\absl\app.py", line 250, in _run_main
sys.exit(main(argv))
File "D:\Projet\model_main.py", line 71, in main
FLAGS.sample_1_of_n_eval_on_train_examples))
TypeError: create_estimator_and_inputs() missing 1 required positional argument: 'hparams'
could someone guided me please
ImportError Traceback (most recent call last)
ImportError: cannot import name 'models'
I have the same problem using COLAB models and problems raise ImportError