class_docstr: Squeeze-and-Excitation layer.
  
  Introduced in SENet: https://arxiv.org/abs/1709.01507
class_docstr_tok: ["Squeeze-and-Excitation","layer",".","Introduced","in","SENet",":","https",":","\/\/arxiv.org\/abs\/1709.01507"]
docstr: Applies SqueezeAndExcite on the 2D inputs.
  
  Args:
    inputs: Input data in shape of `[bs, height, width, features]`.
  
  Returns:
    Output in which channel-wise features of the input are recalibrated.
docstr_tok: ["Applies","SqueezeAndExcite","on","the","2D","inputs",".","Args",":","inputs",":","Input","data","in","shape","of","`","[","bs",",","height",",","width",",","features","]","`",".","Returns",":","Output","in","which","channel-wise","features","of","the","input","are","recalibrated","."]
code: def __call__(self, inputs: jnp.ndarray) -> jnp.ndarray:
      """Applies SqueezeAndExcite on the 2D inputs.
  
      Args:
        inputs: Input data in shape of `[bs, height, width, features]`.
  
      Returns:
        Output in which channel-wise features of the input are recalibrated.
      """
      if inputs.ndim != 4:
          # TODO(dehghani): extend this to N-D inputs with arbitrary spatial dims.
          raise ValueError(
              "Inputs should in shape of `[bs, height, width, features]`"
          )
  
      # Squeeze.
      x = jnp.mean(inputs, axis=(1, 2))
      x = nn.Dense(features=x.shape[-1] // self.reduction_factor)(x)
      x = nn.relu(x)
      # Back to the original feature size.
      x = nn.Dense(features=inputs.shape[-1])(x)
      x = nn.sigmoid(x)
      x = jax.lax.broadcast_in_dim(
          x,
          shape=(x.shape[0], 1, 1, x.shape[-1]),
          broadcast_dimensions=(0, 3),
      )
      # Excite.
      return inputs * x
  
imports: from typing import Callable, Iterable, Optional, Sequence
  import flax.linen
  import jax
  from jax.nn import initializers
  import jax.numpy
  import numpy
label_desc: Use image node_id 1 for calling the SqueezeAndExcite obj's underlying member method code with example usage: obj.__call__(inputs) and returns: unknown