Skip to content

Pre-trained shufflenetv2_x1.5 and shufflenetv2_x2.0 raise "...not supported as of now". #3257

Closed
@gallardorafael

Description

@gallardorafael

🐛 Bug

Pre-trained models of shufflenetv2_x1.5 and shufflenetv2_x2.0 raise the following NotImplementedError: pretrained {} is not supported as of now. Important: pre-trained models of shufflenet_v2_x0_5 and shufflenet_v2_x1_0 are working perfectly.

To Reproduce

Steps to reproduce the behavior:

  1. from torchvision import models
  2. model = models.shufflenet_v2_x1_5(pretrained=pretrained)
  3. model = models.shufflenet_v2_x2_0(pretrained=pretrained)
  4. Raises the following:
  NotImplementedError                       Traceback (most recent call last)
  <ipython-input-15-788c60a16542> in <module>
        1 # Build and train your network
        2 # Transfer Learning
  ----> 3 model = models.shufflenet_v2_x1_5(pretrained=pretrained)
  
  ~/venvs/pytorch_gpu/lib/python3.8/site-packages/torchvision/models/shufflenetv2.py in shufflenet_v2_x1_5(pretrained, progress, **kwargs)
      191         progress (bool): If True, displays a progress bar of the download to stderr
      192     """
  --> 193     return _shufflenetv2('shufflenetv2_x1.5', pretrained, progress,
      194                          [4, 8, 4], [24, 176, 352, 704, 1024], **kwargs)
      195 
  
  ~/venvs/pytorch_gpu/lib/python3.8/site-packages/torchvision/models/shufflenetv2.py in _shufflenetv2(arch, pretrained, progress, *args, **kwargs)
      145         model_url = model_urls[arch]
      146         if model_url is None:
  --> 147             raise NotImplementedError('pretrained {} is not supported as of now'.format(arch))
      148         else:
      149             state_dict = load_state_dict_from_url(model_url, progress=progress)
  
  NotImplementedError: pretrained shufflenetv2_x1.5 is not supported as of now

Expected behavior

Get the pre-trained model of Shufflenet_v2_x1_5 and shufflenet_v2_x2.0.

Environment

  • PyTorch version: 1.5.1
  • Is debug build: False
  • CUDA used to build PyTorch: 10.2
  • ROCM used to build PyTorch: N/A
  • OS: Ubuntu 20.04.1 LTS (x86_64)
  • GCC version: (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
  • Clang version: Could not collect
  • CMake version: Could not collect
  • Python version: 3.8 (64-bit runtime)
  • Is CUDA available: True
  • CUDA runtime version: Could not collect
  • GPU models and configuration: GPU 0: GeForce GTX 1660 Ti with Max-Q Design
  • Nvidia driver version: 450.102.04
  • cuDNN version: Could not collect
  • HIP runtime version: N/A
  • MIOpen runtime version: N/A
  • Versions of relevant libraries:
  • [pip3] numpy==1.19.1
  • [pip3] torch==1.5.1
  • [pip3] torchvision==0.6.1
  • [conda] Could not collect

Additional context

Also tried to get the pre-trained model with:
model = torch.hub.load('pytorch/vision:v0.6.0', 'shufflenet_v2_x2_0', pretrained=True)
and it raised:
RuntimeError: Cannot find callable shufflenet_v2_x2_0 in hubconf

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions