Skip to content

tensor.py

rerun.log.tensor

Tensor = Union[npt.ArrayLike, TorchTensorLike] module-attribute

Type helper for a tensor-like object that can be logged to Rerun.

class TorchTensorLike

Bases: Protocol

Describes what is need from a Torch Tensor to be loggable to Rerun.

def log_tensor(entity_path, tensor, *, names=None, meter=None, ext=None, timeless=False)

Log an n-dimensional tensor.

Parameters:

Name Type Description Default
entity_path str

Path to the tensor in the space hierarchy.

required
tensor npt.ArrayLike

A Tensor object.

required
names Optional[Iterable[Optional[str]]]

Optional names for each dimension of the tensor.

None
meter Optional[float]

Optional scale of the tensor (e.g. meters per cell).

None
ext Optional[Dict[str, Any]]

Optional dictionary of extension components. See rerun.log_extension_components

None
timeless bool

If true, the tensor will be timeless (default: False).

False