kaira.data.UniformTensorDataset

Inheritance diagram of UniformTensorDataset

Inheritance diagram for UniformTensorDataset

class kaira.data.UniformTensorDataset(size: List[int] | Size, low: float = 0.0, high: float = 1.0, device: device | None = None, *args, **kwargs)[source]

Bases: Dataset

Dataset of uniformly distributed random tensors.

Creates a dataset where each sample is a tensor with values uniformly distributed between specified bounds. Useful for simulating continuous sources or analog signals in communication systems and information theory experiments.

data

The generated uniform tensor data with shape (n_samples, *feature_dims)

Methods

__init__

Initialize the uniform tensor dataset.

__init__(size: List[int] | Size, low: float = 0.0, high: float = 1.0, device: device | None = None, *args, **kwargs)[source]

Initialize the uniform tensor dataset.

Parameters:
  • size – Shape of the tensor to generate, where the first dimension represents the number of samples in the dataset

  • low – Lower bound of the uniform distribution (inclusive)

  • high – Upper bound of the uniform distribution (exclusive)

  • device – Device to create the tensor on (default: None, uses default device)

  • *args – Additional positional arguments (ignored).

  • **kwargs – Additional keyword arguments (ignored).