run train.py
I got this error:
/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from float
to np.floating
is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type
.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "deeplab/train.py", line 21, in
from deeplab import common
ModuleNotFoundError: No module named 'deeplab'
Could anyone help me to resolve the problem?
You did not add the librairies to your Python path.
https://github.com/tensorflow/models/blob/master/research/deeplab/g3doc/installation.md
From tensorflow/models/research/ run the following code:
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
How to solve this problem in windows?
@EternityZY You have to modify your environment variable. The instructions can be found here: https://superuser.com/questions/143119/how-do-i-add-python-to-the-windows-path
Given my knowledge in Linux, pwd
returns the current directory you are in. So you should add the following to your PYTHONPATH environment variable:
path/to/models/research
path/to/models/research/slim
Here's what my python path looks like after I do it
If you run the following test afterwards it should work:
# From tensorflow/models/research/
python deeplab/model_test.py
And outputting the following result:
....
----------------------------------------------------------------------
Ran 5 tests in 27.326s
OK
Sounds like this works :) Feel free to re-open with additional questions.
From tensorflow/models/research/ run the following code:
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
why don't I have this file?
I can only see two files in 'tensorflow':
$ cd tensorflow
$ ls
return:
__init__.py __pycache__
Most helpful comment
How to solve this problem in windows?