Tensor Class Reference

Class representing a Tensor, used for inference. More...

Functions

def alloc (self, TensorParameters, params)
 Allocates the Tensor memory. More...
 
def get_dims (self)
 Returns the dimensions of the Tensor. More...
 
def get_element_count (self)
 Returns the total number of elements in the Tensor. More...
 
def get_parameters (self)
 Returns the parameters used to create or define the Tensor. More...
 

Detailed Description

Class representing a Tensor, used for inference.

Functions

◆ alloc()

def alloc (   self,
  TensorParameters,
  params 
)

Allocates the Tensor memory.

Parameters
params: Parameters defining the Tensor creation.

◆ get_dims()

def get_dims (   self)

Returns the dimensions of the Tensor.

Returns
A vector containing the size of each dimension (e.g., {Batch, Channels, Height, Width} for NCHW).

◆ get_element_count()

def get_element_count (   self)

Returns the total number of elements in the Tensor.

Returns
The product of all dimensions.

◆ get_parameters()

def get_parameters (   self)

Returns the parameters used to create or define the Tensor.

Returns
The TensorParameters associated with this Tensor.