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

The training can not run #1

Open
wangpichao opened this issue Apr 28, 2021 · 3 comments
Open

The training can not run #1

wangpichao opened this issue Apr 28, 2021 · 3 comments

Comments

@wangpichao
Copy link

/PatchVisionTransformer/deit/models.py", line 232, in similarity
high_order = (patches.mean(dim=(2, 3), deepdim=True) - patches / (img_size ** 2)) * (img_size ** 2) / (img_size ** 2 - 1)
TypeError: mean() received an invalid combination of arguments - got (deepdim=bool, dim=tuple, ), but expected one of:

  • (*, torch.dtype dtype)
    didn't match because some of the keywords were incorrect: deepdim, dim
  • (tuple of names dim, bool keepdim, *, torch.dtype dtype)
  • (tuple of ints dim, bool keepdim, *, torch.dtype dtype)
@ChengyueGongR
Copy link
Owner

Thanks for your information. It should be changed into `patches.mean(dim=(2, 3), deepdim=True))'

@wangpichao
Copy link
Author

Thanks for your information. It should be changed into `patches.mean(dim=(2, 3), deepdim=True))'

In fact, your release codes have other errors, and I suggest you run the released codes again to make sure it is runable. Thanks.

@ChengyueGongR
Copy link
Owner

Thanks for your advice. The issues are caused by the `similarity function.

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