CANN/asc-devkit SetWeight API文档
·
SetWeight
产品支持情况
功能说明
设置权重矩阵Weight。
函数原型
__aicore__ inline void SetWeight(const AscendC::GlobalTensor<WeightT>& weight)
参数说明
|
Weight在Global Memory上的地址。类型为GlobalTensor。权重矩阵Weight支持的数据类型为:half、bfloat16_t。 |
返回值说明
无
约束说明
无
调用示例
GlobalTensor<half> weightGm;
weightGm.SetGlobalBuffer(reinterpret_cast<__gm__ half *>(weight));
conv3dApi.SetWeight(weightGm);
更多推荐

所有评论(0)