Skip to content

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

Open
@Anthony-Ho

Description

@Anthony-Ho

🐛 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions