tensorflow / tpu

Reference models and tools for Cloud TPUs.
https://cloud.google.com/tpu/
Apache License 2.0
5.21k stars 1.77k forks source link

ModuleNotFoundError: No module named 'hyperparameters' #790

Open shafu0x opened 4 years ago

shafu0x commented 4 years ago

When I try to run a simple inference with python3 ~/tpu/models/official/detection/main.py I get the following error:

Traceback (most recent call last):
  File "/home/sharif/tpu/models/official/detection/inference.py", line 38, in <module>
    from configs import factory as config_factory
  File "/home/sharif/tpu/models/official/detection/configs/factory.py", line 17, in <module>
    from configs import classification_config
  File "/home/sharif/tpu/models/official/detection/configs/classification_config.py", line 18, in <module>
    from hyperparameters import params_dict
ModuleNotFoundError: No module named 'hyperparameters'
abhi-kumar commented 4 years ago

From the terminal where you are running the main.py code run this before it. (Basically adding models directory to python path)

export PYTHONPATH=$PYTHONPATH:~/tpu/models/
tnfru commented 3 years ago

From the terminal where you are running the main.py code run this before it. (Basically adding models directory to python path)

export PYTHONPATH=$PYTHONPATH:~/tpu/models/

This doesn't work for me either. Then it comes with utils.