cannot import name 'torchvision_ssl_encoder'
See original GitHub issueHi I just want to run following example, but I get this error “cannot import name ‘torchvision_ssl_encoder’”
from pl_bolts.utils.self_supervised import torchvision_ssl_encoder
resnet = torchvision_ssl_encoder('resnet18', pretrained=False, return_all_feature_maps=True)
x = torch.rand(3, 3, 32, 32)
feat_maps = resnet(x)
Is something wrong with pytorch-lightning-bolts?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to Fix ImportError: Cannot Import Name in Python - Rollbar
The Python ImportError: cannot import name error occurs when an imported class is not accessible or is in a circular dependency.
Read more >What can I do about "ImportError: Cannot import name X" or ...
physics.py is imported from entity before class Ent is defined and physics tries to import entity that is already initializing. Remove the dependency...
Read more >cannot import name "CLIPVisionModelWithProjection ... - GitHub
I'm not familiar with the development environment or the code, but it seems like it fails to resolve CLIPVisionModelWithProjection when importing the safety ......
Read more >cannot import name 'sql' from 'databricks'
I am working on Databricks version 10.4 premium cluster and while importing sql from databricks module I am getting below error. cannot ......
Read more >How do I fix the ImportError: cannot import name 'delayed'?
delay imported delayed. However, I am still getting the following error: ImportError: cannot import name 'delayed'. I appreciate your help and ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I can confirm this issue on master
seems like we have cyclic import somewhere…
I have bolts version ‘0.3.4’ and I am still getting the error. This is the error trace from a jupyter notebook.