zhanghang1989 / PyTorch-Encoding

A CV toolkit for my papers.
https://hangzhang.org/PyTorch-Encoding/
MIT License
2.04k stars 451 forks source link

No module named encoding.datasets #65

Open Rafrin opened 6 years ago

Rafrin commented 6 years ago

Got this error from the line 19 of test.py. (experiments/segmentation/ folder)

zhanghang1989 commented 6 years ago

Have you install the package yet?

Rafrin commented 6 years ago

git clone https://github.com/zhanghang1989/PyTorch-Encoding && cd PyTorch-Encoding

you mean cloning the git? yes I did

zhanghang1989 commented 6 years ago

python setup.py install

Rafrin commented 6 years ago
  1. git clone https://github.com/zhanghang1989/PyTorch-Encoding && cd PyTorch-Encoding
  2. python setup.py install
  3. cd PyTorch-Encoding/experiments/recognition bash model/download_models.sh
  4. python main.py --dataset cifar10 --model encnetdrop --widen 8 --ncodes 32 --resume model/encnet_cifar.pth.tar --eval
  5. python test.py --dataset PContext --model-zoo Encnet_ResNet50_PContext --eval

these are the steps I am going through and I am getting the error.

zhanghang1989 commented 6 years ago

It is in the experiments/segmentation folder

Rafrin commented 6 years ago

yes, I cd to that experiment/segmentation folder and did the step 5

zhanghang1989 commented 6 years ago

I couldn't reproduce your error on my local machine. The encoding.datasets source code is located at https://github.com/zhanghang1989/PyTorch-Encoding/tree/master/encoding/datasets

Can you attach the whole error message if you still have the problem.

Rafrin commented 6 years ago

untitled

zhanghang1989 commented 6 years ago

Can you try using python3? the code hasn't been tested using python2

Rafrin commented 6 years ago

yes. if you look into the error message i tried with python 3

zhanghang1989 commented 6 years ago

This looks wired. I will take a look. Thanks for reporting it.

Rafrin commented 6 years ago

Thank you

zhanghang1989 commented 6 years ago

Hi @Rafrin, can you try to uninstall pervious installed versions first. Run:

pip uninstall encoding
pip uninstall torch-encoding

until you get an error import encoding, then reinstall this package.

Rafrin commented 6 years ago

Hi, @zhanghang1989 , I am trying to follow your instructions. I don't have the authority to uninstall packages in GPU server as other students are using it. I forwarded the issue to the person in charge. It will take some time. I will let you know if I am still getting the error.

zhanghang1989 commented 6 years ago

do you still have the problem now?

Rafrin commented 6 years ago

I couldn't solve the problem yet. We are trying to get over it.