SetViewShape
函数功能
设置aclTensor的ViewShape。ViewShape表示aclTensor的逻辑shape,可由GetViewShape获取。
函数原型
void SetViewShape(const op::Shape &shape)
返回值说明
无
约束说明
无
调用示例
1 2 3 4 5 6 7 8 |
// 将input的ViewShape设置为[1, 2, 3, 4, 5] void Func(aclTensor *input) { gert::Shape newShape; for (int64_t i = 1; i <= 5; i++) { newShape.AppendDim(i); } input->SetViewShape(newShape); } |
父主题: common_types