class_docstr: 2D MaxPooling like TensorFlow's 'SAME' mode, with a dynamic image size.
  The padding is operated in forward function by calculating dynamically.
class_docstr_tok: ["2D","MaxPooling","like","TensorFlow","'s","'SAME","'","mode",",","with","a","dynamic","image","size",".","The","padding","is","operated","in","forward","function","by","calculating","dynamically","."]
code: def __init__(
      self,
      kernel_size,
      stride,
      padding=0,
      dilation=1,
      return_indices=False,
      ceil_mode=False,
  ):
      super().__init__(
          kernel_size,
          stride,
          padding,
          dilation,
          return_indices,
          ceil_mode,
      )
      self.stride = (
          [self.stride] * 2
          if isinstance(self.stride, int)
          else self.stride
      )
      self.kernel_size = (
          [self.kernel_size] * 2
          if isinstance(self.kernel_size, int)
          else self.kernel_size
      )
      self.dilation = (
          [self.dilation] * 2
          if isinstance(self.dilation, int)
          else self.dilation
      )
  
imports: import re
  import math
  import collections
  from functools import partial
  import torch
  from torch import nn
  from torch.nn import functional
  from torch.utils import model_zoo
label_desc: Use image node_id 1 to create a new MaxPool2dDynamicSamePadding object from inherited base classes: nn with example: obj = MaxPool2dDynamicSamePadding(kernel_size, stride, padding, dilation, return_indices, ceil_mode)