hxtorch.spiking.modules.hx_module.TensorHandle

class hxtorch.spiking.modules.hx_module.TensorHandle(tensor: Optional[torch.Tensor] = None)

Bases: hxtorch.spiking.handle.Handle

Specialization for single tensor, mostly for testing

__init__(tensor: Optional[torch.Tensor] = None)None

Instantiate a tensor handle to hold a single tensor.

Parameters

tensor – torch.Tensor holding data.

Methods

__init__([tensor])

Instantiate a tensor handle to hold a single tensor.

Attributes

tensor

property tensor