mindspore.ops.LRN
- class mindspore.ops.LRN(*args, **kwargs)[source]
Local Response Normalization.
- Parameters
depth_radius (int) – Half-width of the 1-D normalization window with the shape of 0-D. Default: 5.
bias (float) – An offset (usually positive to avoid dividing by 0). Default: 1.0.
alpha (float) – A scale factor, usually positive. Default: 1.0.
beta (float) – An exponent. Default: 0.5.
norm_region (str) – Specifies normalization region. Options: “ACROSS_CHANNELS”. Default: “ACROSS_CHANNELS”.
- Inputs:
x (Tensor) - A 4D Tensor with float16 or float32 data type.
- Outputs:
Tensor, with the same shape and data type as the input tensor.
- Raises
- Supported Platforms:
Ascend
Examples
>>> x = Tensor(np.random.rand(1, 2, 2, 2), mindspore.float32) >>> lrn = ops.LRN() >>> output = lrn(x) >>> print(output.shape) (1, 2, 2, 2)