local_response_norm

dragon.vm.torch.nn.functional.local_response_norm(
  input,
  size,
  alpha=0.0001,
  beta=0.75,
  k=1.0
)[source]

Apply the local response normalization to input. [Krizhevsky et.al, 2012].

The normalization is defined as:

\[y_{i} = x_{i}\left(k + \frac{\alpha}{n} \sum_{j=\max(0, i-n/2)}^{\min(N-1,i+n/2)}x_{j}^2 \right)^{-\beta} \]
Parameters:
  • input (dragon.vm.torch.Tensor) – The input.
  • size (int, required) – The number of neighbouring channels to sum over.
  • alpha (float, optional, default=0.0001) – The scale value \(\alpha\).
  • beta (float, optional, default=0.75) – The exponent value \(\beta\).
  • k (float, optional, default=1.) – The bias constant \(k\).
Returns:

dragon.vm.torch.Tensor – The output tensor.