Tensor

@RequiresApi(value = 27)
abstract class Tensor(val config: Tensor.InitInfo)

Root class of all tensors (global and pipeline).

Parameters

config

Configuration at initialization.

Inheritors

Constructors

Link copied to clipboard
constructor(config: Tensor.InitInfo)

Types

Link copied to clipboard

Initialization for a RGB or RGBA color array tensor.

Link copied to clipboard

The color type (combining DataType and number of channels) used to define a color array.

Link copied to clipboard

Data type enums.

Link copied to clipboard

Initialization of a tensor for double array. If the double values to be contained by the tensor is supposed to be static, you should consider use the String.tensor defined in Pipeline which allows you to

Link copied to clipboard

Initialization of a tensor for float array. If the float values to be contained by the tensor is supposed to be static, you should consider use the String.tensor defined in Pipeline which allows you to

Link copied to clipboard
abstract class InitInfo(val dataType: Tensor.DataType, val dimensions: IntArray, usageFlag: Tensor.TensorUsage, channel: Int, specialFlag: Int = 0)

The most fundamental initialization configuration for Tensor.

Link copied to clipboard

Initialization of a tensor for int array. If the int values to be contained by the tensor is supposed to be static, you should consider use the String.tensor defined in Pipeline which allows you to

Link copied to clipboard
class MultiDimensionalInitInfo(dataType: Tensor.DataType, dimensions: IntArray, channel: Int = 1, dynamicTexture: Boolean = false) : Tensor.InitInfo

Initialization config to declare a multi-dimensional tensor. This type of tensors is the conventionally defined ones in mathematics and physics applications. The data given to the tensor will be interpreted as an array of the declared data type and channels. This is the only type that support arithmetic operations.

Link copied to clipboard

Initialization for a POINT2 array tensor.

Link copied to clipboard

Initialization for a POINT3 array tensor.

Link copied to clipboard

Initialization for a SCALAR array tensor.

Link copied to clipboard

Initialization of a tensor for short array. If the short values to be contained by the tensor is supposed to be static, you should consider use the String.tensor defined in Pipeline which allows you to

Link copied to clipboard
class SliceInitInfo(dataType: Tensor.DataType, size: Int = 1, channel: Int = 2) : Tensor.SpecialUsageInitInfo

Initialization for a SLICE array tensor.

Link copied to clipboard
abstract class SpecialUsageInitInfo(dataType: Tensor.DataType, size: Int, usage: Tensor.TensorUsage, channel: Int) : Tensor.InitInfo

Tensor's initialization config for special usage (usages other then the conventional multi-dimensional tensors).

Link copied to clipboard

Initialization of a tensor for String. If the string to be contained by the tensor is supposed to be static, you should consider use the String.tensor defined in Pipeline which allows you to

Link copied to clipboard

Enum to declare tensor's usage. By default, the tensor shall all be of multi-dimensional usage, which creates non-structured data arrays. Such a tensor observes the conventional definition of tensors in linear algebra, where the values it contains are non-structured.

Link copied to clipboard

Initialization for a timestamp

Properties

Link copied to clipboard
Link copied to clipboard
open var tensorResource: SharedMemory?

The content to the tensor. The provided SharedMemory shall be closed by the caller after the setter completes.

Functions

Link copied to clipboard
protected abstract fun resetTensorValue()

Callback when the tensor resource is reset