def add_shape(self: Network, input: Tensor) -> ShapeLayer

函数功能

在网络中添加一个ShapeLayer,用来获取输入tensor的shape,shapeLayer的输出tensor是一个1维的int类型的tensor。

函数原型

add_shape(self: ascendie.pyascendie.Network, arg0: ascendie.pyascendie.Tensor) -> AscendIE::ShapeLayer

约束说明

参数说明

参数名

参数类型

输入/输出

说明

input

Tensor

输入

ShapeLayer的输入张量。