JaggedTensor

class fvdb.JaggedTensor
abs(self: fvdb.JaggedTensor) fvdb.JaggedTensor
abs_(self: fvdb.JaggedTensor) fvdb.JaggedTensor
ceil(self: fvdb.JaggedTensor) fvdb.JaggedTensor
ceil_(self: fvdb.JaggedTensor) fvdb.JaggedTensor
clone(self: fvdb.JaggedTensor) fvdb.JaggedTensor
cpu(self: fvdb.JaggedTensor) fvdb.JaggedTensor
cuda(self: fvdb.JaggedTensor) fvdb.JaggedTensor
detach(self: fvdb.JaggedTensor) fvdb.JaggedTensor
property device
double(self: fvdb.JaggedTensor) fvdb.JaggedTensor
property dtype
property edim

]).

Type:

The number of dimensions of each element indexed by this JaggedTensor. Same as len(jdata.shape[1

property eshape

].

Type:

The shape each element indexed by this JaggedTensor. Same as jdata.shape[1

float(self: fvdb.JaggedTensor) fvdb.JaggedTensor
floor(self: fvdb.JaggedTensor) fvdb.JaggedTensor
floor_(self: fvdb.JaggedTensor) fvdb.JaggedTensor
static from_data_and_indices(arg0: torch.Tensor, arg1: torch.Tensor, arg2: int) fvdb.JaggedTensor

Initialize jagged tensor with ldim=1 from data and indices.

Parameters:
  • data (torch.Tensor) – The data of the JaggedTensor.

  • indices (torch.Tensor) – The indices indicating the batch index where the element belong to.

  • num_tensors (int) – The batch size of the JaggedTensor.

Returns:

jt (JaggedTensor) – The JaggedTensor with the given data and indices.

static from_data_and_offsets(arg0: torch.Tensor, arg1: torch.Tensor) fvdb.JaggedTensor

Initialize jagged tensor with ldim=1 from data and offsets.

Parameters:
  • data (torch.Tensor) – The data of the JaggedTensor.

  • offsets (torch.Tensor) – The 1-dimensional offsets indicating the start and end of each tensor in data.

Returns:

jt (JaggedTensor) – The JaggedTensor with the given data and offsets.

static from_data_indices_and_list_ids(data: torch.Tensor, indices: torch.Tensor, list_ids: torch.Tensor, num_tensors: int) fvdb.JaggedTensor
static from_data_offsets_and_list_ids(data: torch.Tensor, offsets: torch.Tensor, list_ids: torch.Tensor) fvdb.JaggedTensor
int(self: fvdb.JaggedTensor) fvdb.JaggedTensor
property is_cpu

Whether the JaggedTensor is on a CPU device.

property is_cuda

Whether the JaggedTensor is on a CUDA device.

jagged_like(self: fvdb.JaggedTensor, data: torch.Tensor) fvdb.JaggedTensor
property jdata

The data of the JaggedTensor.

jflatten(self: fvdb.JaggedTensor, dim: int = 0) fvdb.JaggedTensor
property jidx

The indices indicating the batch index where the element belong to.

property jlidx

The list index of the JaggedTensor with size [num_tensors, ldim].

jmax(self: fvdb.JaggedTensor, dim: int = 0, keepdim: bool = False) list[fvdb.JaggedTensor]

Returns the maximum of each batch element.

Returns:
  • values (torch.Tensor) – A tensor of size (batch_size, *) containing the maximum value.

  • indices (torch.Tensor) – A tensor of size (batch_size, *) containing the argmax.

jmin(self: fvdb.JaggedTensor, dim: int = 0, keepdim: bool = False) list[fvdb.JaggedTensor]

Returns the minimum of each batch element.

Returns:
  • values (torch.Tensor) – A tensor of size (batch_size, *) containing the minimum value.

  • indices (torch.Tensor) – A tensor of size (batch_size, *) containing the argmin.

property joffsets

A [num_tensors + 1] array where each row contains the start and end row index in jdata.

jreshape(*args, **kwargs)

Overloaded function.

  1. jreshape(self: fvdb._Cpp.JaggedTensor, lshape: list[int]) -> fvdb._Cpp.JaggedTensor

  2. jreshape(self: fvdb._Cpp.JaggedTensor, lshape: list[list[int]]) -> fvdb._Cpp.JaggedTensor

jreshape_as(self: fvdb.JaggedTensor, other: fvdb.JaggedTensor) fvdb.JaggedTensor
jsum(self: fvdb.JaggedTensor, dim: int = 0, keepdim: bool = False) fvdb.JaggedTensor

Returns the sum of each batch element.

Returns:

sum (torch.Tensor) – A tensor of size (batch_size, *) containing the sum of each batch element, feature dimensions are preserved.

property ldim

The list dimension of this JaggedTensor. E.g. a list has ldim 1, a list-of-lists has ldim2 and so on.

long(self: fvdb.JaggedTensor) fvdb.JaggedTensor
property lshape

The shape of jdata.

property num_tensors

The number of tensors in the JaggedTensor.

property requires_grad
requires_grad_(self: fvdb.JaggedTensor, arg0: bool) fvdb.JaggedTensor
rmask(self: fvdb.JaggedTensor, mask: torch.Tensor) fvdb.JaggedTensor
round(self: fvdb.JaggedTensor, decimals: int = 0) fvdb.JaggedTensor
round_(self: fvdb.JaggedTensor, decimals: int = 0) fvdb.JaggedTensor
property rshape

The shape of the raw data tensor.

sqrt(self: fvdb.JaggedTensor) fvdb.JaggedTensor
sqrt_(self: fvdb.JaggedTensor) fvdb.JaggedTensor
to(*args, **kwargs)

Overloaded function.

  1. to(self: fvdb._Cpp.JaggedTensor, arg0: fvdb._Cpp.TorchDeviceOrString) -> fvdb._Cpp.JaggedTensor

  2. to(self: fvdb._Cpp.JaggedTensor, arg0: torch.dtype) -> fvdb._Cpp.JaggedTensor

  3. to(self: fvdb._Cpp.JaggedTensor, device: fvdb._Cpp.TorchDeviceOrString) -> fvdb._Cpp.JaggedTensor

type(self: fvdb.JaggedTensor, arg0: torch.dtype) fvdb.JaggedTensor
type_as(self: fvdb.JaggedTensor, arg0: fvdb.JaggedTensor) fvdb.JaggedTensor
unbind(self: fvdb.JaggedTensor) object