ContinualAI / ContinualAI/avalanche

cannot import name 'DwsConvBlock' from 'pytorchcv.models.common'

Open
#1,664 1 comment 1 reaction 0 assignees Claimed by @skiaxtro View on GitHub
bug
Dominant language
Python
Stars
2.1k
Forks
321
PR merge metrics
No merged PRs in 30d

Description

🐛 **Describe the bug**
Using the colab notebook "02_models.ipynb", I encountered this error while executing the 2nd code block in the statement, "from avalanche.models import SimpleCNN".

🐜 **To Reproduce**
Run the "02_models.ipynd" in Google Colab

🐝 **Expected behavior**
No Errors and SampleCNN model is printed.

🐞 **Screenshots**

🦋 **Additional context**
The error happens in "/usr/local/lib/python3.10/dist-packages/avalanche/models/mobilenetv1.py". The original statements were:
try:
from pytorchcv.models.mobilenet import DwsConvBlock
except Exception:
from pytorchcv.models.common import DwsConvBlock

"DwsConvBlock" is coded in common/conv.py, so the correct code should be:
try:
from pytorchcv.models.mobilenet import DwsConvBlock
except Exception:
from pytorchcv.models.common.**conv** import DwsConvBlock

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.