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

Question about padding in molecule collation/batching #218

Open
FarzanT opened this issue May 3, 2024 · 0 comments
Open

Question about padding in molecule collation/batching #218

FarzanT opened this issue May 3, 2024 · 0 comments

Comments

@FarzanT
Copy link

FarzanT commented May 3, 2024

Hello,
I am having some difficulty understanding how maximum pad lengths are calculated in the collator functions:

max_node_num = max([item["atom_mask"].shape[0] for item in items])
max_node_num = (max_node_num + 1 + 3) // 4 * 4 - 1

The way it's currently calculated, we end up adding a padded element to all feature vectors even when the batch size (or len(items)) is 1. Perhaps I'm wrong, but would you explain why the above formula is used?

Thank you!

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