def __init__(self, stride, pad, kernel_size, reduce_func) -> None:
        """
        Parameters
        ----------
        stride : int
        pad : int
        dilate : int, optional, by default 1
        reduce_func : the function to use for reduction
        """
        super().__init__()
        self._attrs["op"] = "pool2d"
        self._attrs["stride"] = stride
        self._attrs["pad"] = pad
        self._attrs["reduce_func"] = reduce_func
        self._attrs["kernel_size"] = kernel_size
        self._attrs["KH"] = kernel_size
        self._attrs["KW"] = kernel_size
        self.shape_eval_template = SHAPE_FUNC_TEMPLATE
        self.shape_save_template = SHAPE_ASSIGNMENT_TEMPLATE
        self.exec_cond_template = EXEC_COND_TEMPLATE

        Parameters
        ----------
        stride : int
        pad : int
        dilate : int, optional, by default 1
        reduce_func : the function to use for reduction
        
python/aitemplate/compiler/ops/pool/pool2d.py