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

(READ IF ISSUES RAISE) int32/int64 inconsistency in all_atom.py one hot #3

Open
carbondrop-nick opened this issue Oct 7, 2024 · 2 comments

Comments

@carbondrop-nick
Copy link

\flowmatch\data\all_atom.py line 18:
GROUP_IDX = torch.tensor(residue_constants.restype_atom14_to_rigid_group)
appears to create int32, which results in error 'group_maskRuntimeError: one_hot is only applicable to index tensor.'
I converted to to int64 explicitly at line 19 and that seemed to fix it:
GROUP_IDX = GROUP_IDX.to(torch.int64)
There is probably a better fix...

@carbondrop-nick
Copy link
Author

Same issue in utils/loss.py. residue_index is defaulting to int32 for me, preventing later conversion to one hot. Fixed by making it explicit.

@carbondrop-nick
Copy link
Author

With this int32/int64 issue fixed I was able to through the entire ipynb without error.

@WillHua127 WillHua127 changed the title int32/int64 inconsistency in all_atom.py one hot (READ IF ISSUES RAISE) int32/int64 inconsistency in all_atom.py one hot Oct 8, 2024
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

1 participant