-
Notifications
You must be signed in to change notification settings - Fork 67
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
AttributeError: 'ToMeBlock' object has no attribute 'drop_path' #5
Comments
|
|
drop_path should exist in timm 0.4.12: https://github.com/rwightman/pytorch-image-models/blob/7096b52a613eefb4f6d8107366611c8983478b19/timm/models/vision_transformer.py#L207 Are you using the right version of timm (0.4.12) and passing in a timm model? |
Alternatively, you can replace drop_path with an identity since that's only necessary during training. |
I use timm==0.6.11 My code:
|
Ah, we don't yet support higher versions of timm so you'll have to install 0.4.12. |
I think I solved it timm==0.6.11 I replace (tome/tome/patch/timm.py)
to
|
File "/tome/tome/patch/timm.py", line 35, in forward x = x + self.drop_path_rate(x_attn) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1208, in __getattr__ type(self).__name__, name)) AttributeError: 'ToMeBlock' object has no attribute 'drop_path_rate'
The text was updated successfully, but these errors were encountered: