Closed da-liii closed 2 years ago
i think it might be easy just bump pytorch and torchvision version
Python 3.8.10 (default, May 19 2021, 11:01:55)
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from torchvision.models import convnext_base
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'convnext_base' from 'torchvision.models' (/Users/da/.pyenv/versions/rikai-yolov5/lib/python3.8/site-packages/torchvision/models/__init__.py)
>>>
from torchvision.models import convnext_base
does not work for torchvision 0.11.3
, but works fine for torchvision 0.12.0
.
From CI, we can know that torchvision 0.12.0 is the workable version.
We have two choices:
torchvision.__version__
, throw a RuntimeError likeyou should use torchvision vx.y.z
would be friendly to user.