mindspore.nn.LRN
- class mindspore.nn.LRN(depth_radius=5, bias=1.0, alpha=1.0, beta=0.5, norm_region='ACROSS_CHANNELS')[源代码]
局部响应归一化操作LRN(Local Response Normalization)。
更多参考详见
mindspore.ops.lrn()
。- 支持平台:
Ascend
GPU
CPU
样例:
>>> input_x = Tensor(np.array([[[[0.1], [0.2]], ... [[0.3], [0.4]]]]), mindspore.float32) >>> output = nn.LRN()(input_x) >>> print(output) [[[[0.09534626] [0.1825742 ]] [[0.2860388 ] [0.3651484 ]]]]