probly.representation.sample.torch_functions.TorchSampleCreator

class probly.representation.sample.torch_functions.TorchSampleCreator(*args, **kwargs)[source]

Bases: Protocol, Generic

Protocol for creating sample tensors.

__call__(tensor: D, sample_dim: int, weights: torch.Tensor | None) Any[source]

Create a sample tensor from a torch tensor and a sample dimension.