class_docstr: Two-dimensional downsample using the maximum over a sliding window.
class_docstr_tok: ["Two-dimensional","downsample","using","the","maximum","over","a","sliding","window","."]
docstr: **Arguments:**
  
  - `kernel_size`: The size of the convolutional kernel.
  - `stride`: The stride of the convolution.
  - `padding`: The amount of padding to apply before and after each
      spatial dimension.
  - `use_ceil`: If `True`, then `ceil` is used to compute the final output
      shape instead of `floor`. For `ceil`, if required, extra padding is added.
      Defaults to `False`.
code: def __init__(
      self,
      kernel_size: Union[int, Sequence[int]],
      stride: Union[int, Sequence[int]] = 1,
      padding: Union[int, Sequence[int], Sequence[tuple[int, int]]] = 0,
      use_ceil: bool = False,
  ):
      """**Arguments:**
  
      - `kernel_size`: The size of the convolutional kernel.
      - `stride`: The stride of the convolution.
      - `padding`: The amount of padding to apply before and after each
          spatial dimension.
      - `use_ceil`: If `True`, then `ceil` is used to compute the final output
          shape instead of `floor`. For `ceil`, if required, extra padding is added.
          Defaults to `False`.
      """
  
      super().__init__(
          init=-jnp.inf,
          operation=lax.max,
          num_spatial_dims=2,
          kernel_size=kernel_size,
          stride=stride,
          padding=padding,
          use_ceil=use_ceil,
      )
  
imports: import math
  from collections.abc import Callable, Sequence
  from typing import Optional, Union
  import jax
  import jax.lax
  import jax.numpy
  import jax.random
  from jaxtyping import Array, PRNGKeyArray
  from .._module import field, Module
  from ._misc import all_sequences
label_desc: Use image node_id 1 to create a new MaxPool2d object from inherited base classes: Pool with example: obj = MaxPool2d(kernel_size, stride, padding, use_ceil)