GstAnalytics.Tensor

Fields

Name

Type

Access

Description

data

Gst.Buffer

r/w

Gst.Buffer holding tensor data

data_type

GstAnalytics.TensorDataType

r/w

GstAnalytics.TensorDataType of tensor data

dims

[int]

r/w

number of tensor dimensions

dims_order

GstAnalytics.TensorDimOrder

r/w

Indicate tensor elements layout in memory.

id

int

r/w

semantically identify the contents of the tensor

layout

GstAnalytics.TensorLayout

r/w

Indicate tensor layout

num_dims

int

r/w

number of tensor dimensions

Methods

class

alloc (num_dims)

class

new_simple (id, data_type, data, dims_order, dims)

copy ()

free ()

get_dims ()

Details

class GstAnalytics.Tensor

Hold tensor data

New in version 1.26.

classmethod alloc(num_dims)
Parameters:

num_dims (int) – Number of dimension of the tensors

Returns:

tensor allocated

Return type:

GstAnalytics.Tensor

Allocate a tensor with num_dims dimensions.

New in version 1.26.

classmethod new_simple(id, data_type, data, dims_order, dims)
Parameters:
Returns:

A newly allocated GstAnalytics.Tensor

Return type:

GstAnalytics.Tensor

Allocates a new GstAnalytics.Tensor of dims_order ROW_MAJOR or COLUMN_MAJOR and with an interleaved layout

New in version 1.26.

copy()
Returns:

a new GstAnalytics.Tensor

Return type:

GstAnalytics.Tensor or None

Create a copy of self.

New in version 1.26.

free()

Free tensor

New in version 1.26.

get_dims()
Returns:

The dims array form the tensor

Return type:

[int]

Gets the dimensions of the tensor.

New in version 1.26.