下载
中文
注册

类说明

Tensor数据类,作为模型推理的输入与输出的数据结构。

Tensor类涉及申请Device侧资源,与MxDeInit的作用域冲突,因此,其作用域不能大于或等于MxDeInit的作用域。

支持的型号

接口的硬件支持情况如表1所示,标识的含义如下:
  • √:支持
  • x:不支持
表1 接口的硬件支持情况

接口

Atlas 200I/500 A2 推理产品

Atlas 推理系列产品

Atlas 800I A2推理产品

Atlas 200/300/500 推理产品

BatchConcat

Clone

x

GetByteSize

GetData

GetDataType

GetDeviceId

GetMemoryType

x

GetReferRect

x

GetShape

GetValidRoi

x

IsEmpty

x

IsWithMargin

x

Malloc

operator =

x

operator ==

x

SetShape

x

Tensor

~Tensor

TensorFree

x

TensorMalloc

ToDevice

ToDvpp

x

ToHost

SetReferRect

x

x

x

SetTensorValue

x

SetValidRoi

x

Transpose

x