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

When import the library, appears an error said that cant import DwsCo… #1663

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

skiaxtro
Copy link

…nvBlock.

The problem is at "mobilenetv1.py" file at line 25. There is import "from pytorchcv.models.common import DwsConvBlock". The problem is that in common, there is not DwsConvBlock. Instead "DwsConvBlock" is in "pytorchcv.models.common.conv" .

So to solve the problem must change line 25 with "from pytorchcv.models.common.conv import DwsConvBlock"

…nvBlock.


The problem is at "mobilenetv1.py" file at line 25. There is  import "from pytorchcv.models.common import DwsConvBlock".
The problem is that in common, there is not DwsConvBlock. Instead "DwsConvBlock" is in "pytorchcv.models.common.conv" . 

So to solve the problem must change line 25 with "from pytorchcv.models.common.conv import DwsConvBlock"
@AntonioCarta
Copy link
Collaborator

Thank you for the PR!
It seems that the current solution is not robust to different versions of pytorchcv. Tests are failing with ModuleNotFoundError: No module named 'pytorchcv.models.common.conv'; 'pytorchcv.models.common' is not a package.

@samuelebodon
Copy link

…nvBlock.

The problem is at "mobilenetv1.py" file at line 25. There is import "from pytorchcv.models.common import DwsConvBlock". The problem is that in common, there is not DwsConvBlock. Instead "DwsConvBlock" is in "pytorchcv.models.common.conv" .

So to solve the problem must change line 25 with "from pytorchcv.models.common.conv import DwsConvBlock"

I can confirm, this fix works!

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

Successfully merging this pull request may close these issues.

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