@staticmethod
def forward(ctx, y, x, kernel_size, stride, padding, dilation, average):
    ctx.save_for_backward(x)
    kernel_size = [(k + (2 * (d - 1))) for (k, d) in zip(kernel_size, dilation)]
    ctx.kernel_size = kernel_size
    ctx.stride = stride
    ctx.padding = padding
    ctx.dilation = dilation
    ctx.average = average
    if x.is_cuda:
        gpu.conv_rectify(y, x, kernel_size, stride, padding, dilation, average)
    else:
        cpu.conv_rectify(y, x, kernel_size, stride, padding, dilation, average)
    ctx.mark_dirty(y)
    return y
@staticmethod
def forward(ctx, y, x, kernel_size, stride, padding, dilation, average):
    ctx.save_for_backward(x)
    kernel_size = [(k + (2 * (d - 1))) for (k, d) in zip(kernel_size, dilation)]
    ctx.kernel_size = kernel_size
    ctx.stride = stride
    ctx.padding = padding
    ctx.dilation = dilation
    ctx.average = average
    if x.is_cuda:
        gpu.conv_rectify(y, x, kernel_size, stride, padding, dilation, average)
    else:
        cpu.conv_rectify(y, x, kernel_size, stride, padding, dilation, average)
    ctx.mark_dirty(y)
    return y