在网络中添加一个Reduce层。
add_reduce(self: ascendie.pyascendie.Network, arg0: ascendie.pyascendie.Tensor, arg1: ascendie.pyascendie.ReduceOperation, arg2: int, arg3: bool) -> AscendIE::ReduceLayer
参数名 |
参数类型 |
输入/输出 |
说明 |
---|---|---|---|
input |
Tensor |
输入 |
Reduce层的输入张量。 |
operation |
ReduceOperation |
输入 |
归约操作类型,取值详见ascendie.ReduceOperation |
reduceAxes |
int |
输入 |
进行归约的轴。reduceAxes是按位运算来指定在哪些轴进行操作。 例如:reduceAxes = 0b01, 指的是在dim = 0上操作;reduceAxes = 0b110, 指的是在dim = 1和dim = 2上操作。这里的int对应C++中的uint32_t。 |
keepDimensions |
bool |
输入 |
|