下载
EN
注册

AllocTensorMsg

函数功能

根据shape和data type申请tensor类型的msg。该函数供Proc调用。

函数原型

std::shared_ptr<FlowMsg> AllocTensorMsg(const std::vector<int64_t> &shape, TensorDataType dataType)

参数说明

参数名

输入/输出

描述

Shape

输入

Tensor的shape。

dataType

输入

Tensor的dataType。

返回值

申请的tensor指针。

异常处理

申请不到tensor指针则返回NULL。

约束说明

无。