Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

tensor2tensor not found! even installed t2t #3

Closed
Paul0M opened this issue Jun 15, 2018 · 4 comments
Closed

tensor2tensor not found! even installed t2t #3

Paul0M opened this issue Jun 15, 2018 · 4 comments

Comments

@Paul0M
Copy link

Paul0M commented Jun 15, 2018

Hi,

Ubuntu 1604
MiniConda3
Python3.6.5
TensorFlow1.8.0

I've cloned this repo and used python -m pip install -e . --user in the director
but when I prepare the dataset .tensor2tensor not found! promtps.
Dose anyone have any ideas?

compare_gan$ compare_gan_prepare_datasets.sh 
tensor2tensor not found!
compare_gan$ bash compare_gan/bin/compare_gan_prepare_datasets.sh 
tensor2tensor not found!

so I uninstall compare-gan and install tensor2tensor

compare_gan$ pip uninstall compare-gan
Uninstalling compare-gan-1.0:
  Would remove:
    /home/mp/miniconda3/lib/python3.6/site-packages/compare-gan.egg-link
Proceed (y/n)? y
  Successfully uninstalled compare-gan-1.0

compare_gan$ pip install tensor2tensor
Requirement already satisfied: pyasn1<0.5.0,>=0.4.1 in /home/mp/miniconda3/lib/python3.6/site-packages (from pyasn1-modules>=0.2.1->google-auth>=1.4.1->google-api-python-client->tensor2tensor) (0.4.3)
Installing collected packages: tensor2tensor
Successfully installed tensor2tensor-1.6.3

And again using pip install -e . or python -m pip install -e . --user and execute compare_gan_prepare_datasets.sh

$ compare_gan_prepare_datasets.sh 
tensor2tensor not found!

Successful for testing t2t

t2t-trainer \
  --generate_data \
  --data_dir=~/t2t_data \
  --output_dir=~/t2t_train/mnist \
  --problem=image_mnist \
  --model=shake_shake \
  --hparams_set=shake_shake_quick \
  --train_steps=1000 \
  --eval_steps=100

INFO:tensorflow:Finished evaluation at 2018-06-15-05:36:40
INFO:tensorflow:Saving dict for global step 1000: global_step = 1000, loss = 0.047610797, metrics-image_mnist/targets/accuracy = 0.9956, metrics-image_mnist/targets/accuracy_per_sequence = 0.9956, metrics-image_mnist/targets/accuracy_top5 = 1.0, metrics-image_mnist/targets/neg_log_perplexity = -0.015870268
INFO:tensorflow:Stop training model as max steps reached

@Paul0M Paul0M closed this as completed Jun 15, 2018
@Paul0M Paul0M changed the title tensor2tensor not found! tensor2tensor not found! even install t2t Jun 15, 2018
@Paul0M Paul0M reopened this Jun 15, 2018
@Paul0M Paul0M changed the title tensor2tensor not found! even install t2t tensor2tensor not found! even installed t2t Jun 15, 2018
@Jiajie-Mei
Copy link

Hello, I also encountered the same problem. I fixed the issue by modifying the install_requires and extras_require in the setup.py and rerun "python -m pip install -e . --user". Like this:

install_requires=[
'future',
'numpy',
'pillow',
'protobuf',
'tensor2tensor',
'tensorflow',
'tensorflow_gpu',
],
extras_require={

},

That is, I simply move the content of extras_require to install_requires. This makes the setup.py script install packages and create some binary files in ~/.local/bin. It seems that if you didn't do that, the "python -m pip install -e . --user" would never install the extra packages for you.

@cclauss
Copy link
Contributor

cclauss commented Jul 14, 2018

What do you get when you python --version ?

@rhaps0dy
Copy link

Just edit compare_gan_prepare_datasets.sh to say T2T_DATAGEN="t2t-datagen" instead of the current line 18, and delete lines 22-26. Your $PATH environment variable will probably take care of the rest.

@Paul0M
Copy link
Author

Paul0M commented Aug 20, 2018

As @rhaps0dy says, this is an environment problem.
We can use which t2t-datagen to locate the real location and then edit line 18 in compare_gan_prepare_datasets.sh
Here is my conda envir: /home/ubuntu/hdd1/zip_data/Paul/miniconda3/bin/t2t-datagen

@Paul0M Paul0M closed this as completed Aug 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants