-
Notifications
You must be signed in to change notification settings - Fork 94
ModuleNotFoundError of timm.models.layers.helpers with timm 0.9.2 #58
Copy link
Copy link
Open
Description
With timm 0.9.2 installed, running the example toolbox.py command, I see an error:
Traceback (most recent call last):
File "/home/mcollins/repo/external/EfficientFormer/toolbox.py", line 6, in <module>
from models import *
File "/home/mcollins/repo/external/EfficientFormer/models/__init__.py", line 1, in <module>
from .efficientformer import efficientformer_l1, efficientformer_l3, efficientformer_l7
File "/home/mcollins/repo/external/EfficientFormer/models/efficientformer.py", line 15, in <module>
from timm.models.layers.helpers import to_2tuple
ModuleNotFoundError: No module named 'timm.models.layers.helpers'
I believe this is due to the changes described at:
https://github.com/huggingface/pytorch-image-models/tree/cd950e6583bd4c5961d88059ff669149d100a1d1#whats-new
timm.models.layers moved to timm.layers
Though I am not sure why the described deprecation mapping doesn't still work for the helpers module.
I see two possible changes that would address this:
- Update imports of
timm.models.layers.helpersto the new location attimm.layers.helpers(and other imports fromtimm.layers) - Specify the version of timm to be < 0.9 in
requirements.txt
I could send a PR for either change if desired.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels