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

Need help for reconstracting your experiments #13

Closed
wenhaowang1995 opened this issue Apr 30, 2023 · 2 comments
Closed

Need help for reconstracting your experiments #13

wenhaowang1995 opened this issue Apr 30, 2023 · 2 comments

Comments

@wenhaowang1995
Copy link

Hi !
I install all the requirments by pip and when I run MAE code, here comes up with an error:

Traceback (most recent call last):
File "D:\mywork\Projects\PJ1\my_MAE_cifar\main.py", line 87, in <module>
rep, backward_indices = encoder(img0)
File "D:\Python\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "D:\mywork\Projects\PJ1\my_MAE_cifar\model.py", line 80, in forward
features = self.layer_norm(self.transformer(patches))
File "D:\Python\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "D:\Python\lib\site-packages\torch\nn\modules\container.py", line 141, in forward
input = module(input)
File "D:\Python\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "D:\Python\lib\site-packages\timm\models\vision_transformer.py", line 268, in forward
x = x + self.drop_path1(self.ls1(self.attn(self.norm1(x))))
File "D:\Python\lib\site-packages\torch\nn\modules\module.py", line 1185, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'Block' object has no attribute 'drop_path1'. Did you mean: 'drop_path'?

This seems to be a problem comes from TIMM package

While I look into the vision_transformer.py image of TIMM package, it seems there is no problem with the drop_path1 and drop_path2.

Therefore could you please tell me which version of TIMM are you using? It is best if you could provide your torch and cuda version

@IcarusWizard
Copy link
Owner

Hi. The requirement file should already fix the timm to 0.4.21. Could you check whether the version is correct by running pip list?

@wenhaowang1995
Copy link
Author

Oh, really thanks, I use an environment with higher edition timm and torch, therefore, it directly ignore the previous edition. I create new env and install the requirements. The problems solved.
Thank you very much.
All the best

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

No branches or pull requests

2 participants