def METHOD_NAME(self, stride, pad, kernel, size,
                     input_channels, batch_size,
                     method, gc, dc):
    assume(pad < kernel)
    op = core.CreateOperator(
        method,
        ["X"],
        ["Y"],
        stride=stride,
        pad=pad,
        kernel=kernel,
        device_option=dc[0],
    )
    X = np.random.rand(
        batch_size, input_channels, size, size
    ).astype(np.float32)
    self.assertDeviceChecks(dc, op, [X], [0])
    if 'MaxPool' not in method:
        self.assertGradientChecks(gc, op, [X], 0, [0])