xnn.common.train.graphed.capacity#

xnn.common.train.graphed.capacity(planner, dataset, batch_size)[source]#

Counts that fit every batch of batch_size structures of dataset.

Each count is the sum over the batch_size largest structures, plus room for the padding structure (two atoms, two edges as one reverse pair, one plan entry); the plan sizes the planner lists in maxima (widths per edge) are the largest over the structures. Builds the index plan of every structure once (kept by dataset).

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

  • dataset (PlannedDataset) – The training structures.

  • batch_size (int) – Structures per batch.

Return type:

Capacity