kornia.core

class kornia.core.TensorWrapper(data)[source]

Wrapper around PyTorch tensors that tracks attribute and function usage.

This class provides a transparent wrapper around PyTorch tensors while tracking which attributes and functions are accessed. Useful for debugging and understanding tensor usage patterns.

Variables:
  • _data – The underlying PyTorch tensor.

  • used_attrs – Set of attribute names that have been accessed.

  • used_calls – Set of functions that have been called.

property data: Tensor

Access the underlying tensor.

unwrap()[source]

Return the underlying PyTorch tensor.

Return type:

Tensor

used_attrs
used_calls