jakesnell / prototypical-networks

Code for the NeurIPS 2017 Paper "Prototypical Networks for Few-shot Learning"
MIT License
1.11k stars 252 forks source link

ModuleNotFoundError: No module named 'protonets.utils' #14

Open Chibuikem709 opened 5 years ago

Chibuikem709 commented 5 years ago

Hello!

I am trying to replicate this experiment, but when I run the following command: python scripts/train/few_shot/run_train.py --data.cuda --log.exp_dir results

I get the following error:

Traceback (most recent call last): File "scripts/train/few_shot/run_train.py", line 3, in <module> from train import main File "/gpfs/data/lcrawfo1/cnwizu/PythonSandbox/prototypical-networks-master/scripts/train/few_shot/train.py", line 16, in <module> import protonets.utils.data as data_utils ModuleNotFoundError: No module named 'protonets.utils'

I followed the readme exactly. What is the solution?

Thanks in advance!

SherryWang00 commented 4 years ago

Hello!

I am trying to replicate this experiment, but when I run the following command: python scripts/train/few_shot/run_train.py --data.cuda --log.exp_dir results

I get the following error:

Traceback (most recent call last): File "scripts/train/few_shot/run_train.py", line 3, in <module> from train import main File "/gpfs/data/lcrawfo1/cnwizu/PythonSandbox/prototypical-networks-master/scripts/train/few_shot/train.py", line 16, in <module> import protonets.utils.data as data_utils ModuleNotFoundError: No module named 'protonets.utils'

I followed the readme exactly. What is the solution?

Thanks in advance!

I think you may need to edit the setup.py file: change the command line "packages=['protonets']" into "packages=['protonets', 'protonets.utils', 'protonets.data', 'protonets.models']"

Ha0Tang commented 4 years ago

I am meeting the same problem, have you solved it?

SherryWang00 commented 4 years ago

I am meeting the same problem, have you solved it?

Yeah,,, I made it work by editting the setup.py file: change the command line "packages=['protonets']" into "packages=['protonets', 'protonets.utils', 'protonets.data', 'protonets.models']".