-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The static method `MolDataset.collateMolDataset` can be used as the collate_fn within `torch.utils.data.DataLoader`. This will return: lengths, centers, coordinates, types, radii and labels of all of the examples in a batch. Length corresponds to the number of atoms in example as each example will be padded to the length of the example with the most atoms in the batch. This allows the use of `gridmaker.forward` on the gpu and using molgrid with DataLoader and `torch.utils.data.distributed.DistributedSampler`.
- Loading branch information
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters