Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have error about checkpoint #261

Closed
paulpham1407 opened this issue Mar 4, 2023 · 5 comments
Closed

I have error about checkpoint #261

paulpham1407 opened this issue Mar 4, 2023 · 5 comments

Comments

@paulpham1407
Copy link

paulpham1407 commented Mar 4, 2023

image
ValueError: No checkpoint is available for model type shufflenetv2_x2.0

@dimabendera
Copy link
Member

Please provide full traceback and the script you are running

@paulphong
Copy link

The pretrained weights were added in this PR last year so you might need to update torchvision.
This code works fine in the current nightly release:

model = models.shufflenet_v2_x2_0(pretrained=True)

@paulpham1407
Copy link
Author

ImportError                               Traceback (most recent call last)
/tmp/ipykernel_66/3671554270.py in <module>
      5 from _paths import nomeroff_net_dir
      6 
----> 7 from nomeroff_net import pipeline
      8 from nomeroff_net.tools import unzip
      9 

/var/www/nomeroff-net/nomeroff-net/examples/ju/benchmark/../../../nomeroff_net/__init__.py in <module>
      1 from nomeroff_net.pipes.number_plate_keypoints_detectors.bbox_np_points import NpPointsCraft
----> 2 from nomeroff_net.pipes.number_plate_text_readers.text_detector import TextDetector
      3 from nomeroff_net.pipes.number_plate_text_readers.text_postprocessing import (text_postprocessing,
      4                                                                               text_postprocessing_async)
      5 from nomeroff_net.pipes.number_plate_classificators.options_detector import OptionsDetector

/var/www/nomeroff-net/nomeroff-net/examples/ju/benchmark/../../../nomeroff_net/pipes/number_plate_text_readers/text_detector.py in <module>
      4 from typing import List, Dict, Tuple
      5 from torch import no_grad
----> 6 from .base.ocr import OCR
      7 from nomeroff_net.tools.mcm import modelhub
      8 from nomeroff_net.tools.errors import TextDetectorError

/var/www/nomeroff-net/nomeroff-net/examples/ju/benchmark/../../../nomeroff_net/pipes/number_plate_text_readers/base/ocr.py in <module>
     16 from torchvision import models
     17 from nomeroff_net.data_modules.numberplate_ocr_data_module import OcrNetDataModule
---> 18 from nomeroff_net.nnmodels.ocr_model import NPOcrNet, weights_init
     19 
     20 from nomeroff_net.tools.image_processing import normalize_img

/var/www/nomeroff-net/nomeroff-net/examples/ju/benchmark/../../../nomeroff_net/nnmodels/__init__.py in <module>
      2 from .numberplate_orientation_model import NPOrientationNet
      3 from .numberplate_inverse_model import NPInverseNet
----> 4 from .numberplate_options_model import NPOptionsNet

/var/www/nomeroff-net/nomeroff-net/examples/ju/benchmark/../../../nomeroff_net/nnmodels/numberplate_options_model.py in <module>
      7 from torch.nn import functional
      8 from .numberplate_classification_model import ClassificationNet
----> 9 from torchvision.models import efficientnet_v2_s
     10 from nomeroff_net.tools.errors import NPOptionsNetError
     11 import contextlib

ImportError: cannot import name 'efficientnet_v2_s' from 'torchvision.models' (/opt/conda/lib/python3.8/site-packages/torchvision/models/__init__.py)

@ApelSYN
Copy link
Member

ApelSYN commented Mar 10, 2023

Make sure you have torchvision>=0.14.1

@paulpham1407
Copy link
Author

I fixed, thanks you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants