Skip to content

[torch]

Pytorch models interfacing tools.

This submodule provides with a generic interface to wrap up any PyTorch torch.nn.Module instance that is to be trained with gradient descent.

This module exposes the following classes:

  • TorchModel: Model subclass to wrap torch.nn.Module objects.
  • TorchOptiModule: OptiModule subclass to wrap torch.nn.Optimizer objects.
  • TorchVector: Vector subclass to wrap torch.Tensor objects.

It also exposes the utils submodule, which mainly aims at providing tools used in the backend of the former objects.