def add_constant(self: Network, dimensions: Dims, weights: WeightsBuf) -> ConstantLayer

函数功能

添加常量层。

函数原型

add_constant(self: ascendie.pyascendie.Network, arg0: ascendie.pyascendie.Dims, arg1: ascendie.pyascendie.WeightsBuf) -> AscendIE::ConstantLayer

约束说明

当前不支持动态shape。

参数说明

参数名

参数类型

输入/输出

说明

dimensions

Dims

输入

常量层的维度。

weights

WeightsBuf

输入

常量层的权重。