Skip to content

tinker_cookbook.supervised.SupervisedDataset

class tinker_cookbook.supervised.SupervisedDataset(**)

Abstract base for datasets used in supervised learning.

get_batch(index)

Return a batch of training Datum objects at the given index.

Parameters:

  • index (int) – The batch index.

Returns: list[tinker.Datum]: The training datums for this batch.

set_epoch(seed)

Notify the dataset that a new epoch is starting.

Parameters:

  • seed (int) – Epoch seed that can be used for deterministic shuffling. Default 0.