probly.representation.sample.torch_functions

Torch function implementations for sample tensors.

Classes

TorchSampleCreator

Protocol for creating sample tensors.

TorchSampleInternals

Internal information about a sample tensor.

Functions

torch_adjoint_function

Implementation of torch.adjoint for sample tensors.

torch_cat_function

Implementation of torch.cat and aliases for sample tensors.

torch_function_override

Decorator to convert a bound torch function to a torch function.

torch_internals_override

Decorator to convert a function taking a sample tensor argument.

torch_permute_function

Implementation of torch.permute for sample tensors.

torch_reduction_function

Implementation of dimension-reducing torch functions with a keepdim kwarg.

torch_sample_internals

Get internals for a sample tensor.

torch_stack_function

Implementation of torch.stack for sample tensors.

torch_transpose_function

Implementation of torch.transpose for sample tensors.

track_sample_dim_after_reduction

Track the sample dimension after a reduction operation.