TATensor

class torchaug.ta_tensors.TATensor[source]

Base class for all TATensors.

You probably don’t want to use this class unless you’re defining your own custom TATensors.

property device: device

Is the torch.device where this Tensor is.

property ndim: int

Alias for dim()

property shape: Size | List[int] | Tuple[int, ...]

Returns the size of the self tensor. Alias for size.

See also Tensor.size().

Example:

>>> t = torch.empty(3, 4, 5)
>>> t.size()
torch.Size([3, 4, 5])
>>> t.shape
torch.Size([3, 4, 5])