SetWeight
产品支持情况
产品 |
是否支持 |
---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
|
x |
|
x |
功能说明
设置权重矩阵Weight。
函数原型
1 | __aicore__ inline void SetWeight(const AscendC::GlobalTensor<WeightT>& weight) |
参数说明
参数名 |
输入/输出 |
描述 |
---|---|---|
weight |
输入 |
Weight在Global Memory上的地址。类型为GlobalTensor。权重矩阵Weight支持的数据类型为:half/bfloat16_t。 |
返回值说明
无
约束说明
无
调用示例
1 2 3 | GlobalTensor<half> weightGm; weightGm.SetGlobalBuffer(reinterpret_cast<__gm__ half *>(weight)); conv3dApi.SetWeight(weightGm); |
父主题: Conv3D