xnn.common.train.graphed.PlannedDataset#

class xnn.common.train.graphed.PlannedDataset(dataset, planner)[source]#

Bases: object

A dataset whose structures carry their index plans, built once.

A structure’s plan does not change during training, so it is built on the first access (the capacity pass touches every structure) and kept as 32-bit integers; a batch then only concatenates the plans of its structures (combine()). Items are the dataset’s graphs with the plan attached as index_plan.

Parameters:
  • dataset (sequence of AtomicGraph) – The training structures.

  • planner (callable) – The model’s index planner.

plan(i, graph=None)[source]#

The index plan of structure i.

Parameters:
Return type:

Dict[str, Tensor]