xnn.gnn.models.dimenet.TripletPlanner#
- class xnn.gnn.models.dimenet.TripletPlanner[source]#
Bases:
objectThe triplets of a batch, built outside the model step for a captured training step.
A captured step (
xnn.common.train.graphed) needs fixed shapes and no host synchronization, and the triplet count of a batch is known only after enumerating them. A data-loader worker therefore builds them on the CPU,{"kj": ..., "ji": ...}(directed_triplets()), pads them to a fixed count, and attaches them to the batch asindex_plan, whereDimeNet.forward()takes them from. Holds no state, so the workers receive it cheaply.- offsets = {'ji': 'edges', 'kj': 'edges'}#
The count each plan entry indexes (for batching the plans of single structures).