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

ModuleNotFoundError: No module named 'model' #37

Open
ayush9198gupta opened this issue May 8, 2020 · 3 comments
Open

ModuleNotFoundError: No module named 'model' #37

ayush9198gupta opened this issue May 8, 2020 · 3 comments

Comments

@ayush9198gupta
Copy link

Hi,

I am running your model on colab , I have already run the file (make.sh) successfully but when I am running the command python train.py it stuck on following error which is not solved

model warp
Traceback (most recent call last):
  File "train.py", line 32, in <module>
    opt = TrainOptions().parse(store_options=True)  # get training options
  File "/content/drive/My Drive/Angelium/fashion_recommandation/SwapNet/SwapNet/options/base_options.py", line 212, in parse
    opt = self.gather_options()
  File "/content/drive/My Drive/Angelium/fashion_recommandation/SwapNet/SwapNet/options/base_options.py", line 181, in gather_options
    options_modifier = import_source.get_options_modifier(name)
  File "/content/drive/My Drive/Angelium/fashion_recommandation/SwapNet/SwapNet/models/__init__.py", line 29, in get_options_modifier
    model_class = find_model_using_name(model_name)
  File "/content/drive/My Drive/Angelium/fashion_recommandation/SwapNet/SwapNet/models/__init__.py", line 12, in find_model_using_name
    modellib = importlib.import_module(model_filename)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/content/drive/My Drive/Angelium/fashion_recommandation/SwapNet/SwapNet/models/warp_model.py", line 10, in <module>
    from modules.swapnet_modules import WarpModule
  File "/content/drive/My Drive/Angelium/fashion_recommandation/SwapNet/SwapNet/modules/swapnet_modules.py", line 14, in <module>
    from model.roi_layers import ROIAlign
ModuleNotFoundError: No module named 'model'

Kindly help to solve this issue.
Thanks

@andrewjong
Copy link
Owner

Hi, please try checking out the feat/torchvision-roi-align branch.

@ayush9198gupta
Copy link
Author

ayush9198gupta commented May 9, 2020

Hi @andrewjong

Can you please specify the path or what can be done to fix the issue.

I am following below instructions:

cd /content/drive/My Drive/Ayush Gupta/swapnet/SwapNet/

then
!python train.py --name deep_fashion/ --model warp --dataroot data/deep_fashion/

while execute the above it revert back me with error

model warp Traceback (most recent call last): File "train.py", line 33, in <module> opt = TrainOptions().parse(store_options=True) # get training options File "/content/drive/My Drive/Ayush Gupta/swapnet/SwapNet/options/base_options.py", line 212, in parse opt = self.gather_options() File "/content/drive/My Drive/Ayush Gupta/swapnet/SwapNet/options/base_options.py", line 181, in gather_options options_modifier = import_source.get_options_modifier(name) File "/content/drive/My Drive/Ayush Gupta/swapnet/SwapNet/models/__init__.py", line 29, in get_options_modifier model_class = find_model_using_name(model_name) File "/content/drive/My Drive/Ayush Gupta/swapnet/SwapNet/models/__init__.py", line 12, in find_model_using_name modellib = importlib.import_module(model_filename) File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/content/drive/My Drive/Ayush Gupta/swapnet/SwapNet/models/warp_model.py", line 10, in <module> from modules.swapnet_modules import WarpModule File "/content/drive/My Drive/Ayush Gupta/swapnet/SwapNet/modules/swapnet_modules.py", line 14, in <module> from model.roi_layers import ROIAlign ModuleNotFoundError: No module named 'model'

Kindly suggest
Thanks

@andrewjong
Copy link
Owner

I have since merged the torchvision version of ROI into master. Should be able to work on the master branch now, after a git pull.

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

2 participants