xnn.common.models.hub.checkpoint.Checkpoint#

class xnn.common.models.hub.checkpoint.Checkpoint(config, state_dict, card, path)[source]#

Bases: object

A model’s weights and the config that rebuilds it.

Variables:
  • config (Config or None) – The run configuration (None for a bare state dict).

  • state_dict (dict of str to torch.Tensor) – Weights in the ForceStressOutput layout (keys prefixed model.), as the trainer saves them.

  • card (ModelCard or None) – The card of a portable directory.

  • path (pathlib.Path) – Where the checkpoint was read from.

Parameters: