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

A minor issue #1

Closed
ljb121002 opened this issue Dec 1, 2021 · 2 comments
Closed

A minor issue #1

ljb121002 opened this issue Dec 1, 2021 · 2 comments

Comments

@ljb121002
Copy link

Hi, very solid work. But I think there is a typo in the class "MuskProcessor" of /src/utils/custom_models/preprocess.py.
"ones_mask = torch.where(ones_mask.view(-1) > 0)[0]" this line choose those patches which intersect with ablation columns or blocks, and they belong to [0, 195]. To keep the class token always, the code just adds a 0 at the beginning of ones_mask in the next line. But I think we should first change the range from [0, 195] to [1, 196], then add the 0 :)

@scoutsaachi
Copy link
Collaborator

Hi!

The full line here is
ones_mask = torch.where(ones_mask.view(-1) > 0)[0] + 1
which does first change the range to [1,196] and then prepends the 0. The code thus already performs exactly as you described.

@ljb121002
Copy link
Author

Ohh yeah right, sorry about this!

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