Type Aliases
Types and type aliases used by Minnt.
minnt.AnyArray
module-attribute
A type alias for any array-like structure.
PyTorch tensors, NumPy arrays, lists, and tuples are supported.
minnt.DataFormat
module-attribute
A type alias for image data format description.
minnt.HasCompute
minnt.Logs
module-attribute
A dictionary of logs, with keys being the log names and values being the log values.
When the logs are returned by a minnt.TrainableModule or passed to a minnt.Callback, they are always evaluated to just float values.
minnt.Reduction
module-attribute
A type alias for reduction methods used in losses and metrics.
minnt.Tensor
module-attribute
Tensor: TypeAlias = Tensor | PackedSequence
A type alias for a single tensor or a packed sequence of tensors.
minnt.TensorOrTensors
module-attribute
TensorOrTensors: TypeAlias = (
Tensor | tuple[Tensor, ...] | list[Tensor] | dict[str, Tensor] | Any
)
A type alias for a single tensor or a tensor structure.
While a tensor or a sequence of them is the most common, any type is allowed here to accomodate nested or completely custom data structures.