quantlab.model.torch_model#

Torch variant of the model layer: TorchModel, the base class of every torch head.

TorchModel extends BaseModel with the epoch loop: the collected panel is held as a TrainingPanel of torch tensors, the head’s _dataset hook turns it into a PyTorch Dataset (one cross-section per bar by default, see quantlab.model.torch_data) and _dataloader batches it. A head implements the window, the network and the loss; every other learning choice is an optional hook. Checkpoints are .pth files. Shipped heads live in quantlab/model/predefined.

Classes

TorchModel

Torch variant: standard PyTorch datasets and loaders, every learning choice a hook.