def METHOD_NAME(x, in_planes, out_planes, kernel_size, padding, stride=1, dilation=1, groups=1, init_method=None, w_=None):
    N,C,H,W = x.shape
    Kh, Kw = kernel_size, kernel_size
    G = groups
    CpG = C // G # channels per group
    padding = (padding, padding)
    dilation = (dilation, dilation)
    stride = (stride, stride)
    assert C==in_planes
    oc = out_planes
    oh = (H+padding[0]*2-Kh*dilation[0]+dilation[0]-1)//stride[0]+1
    ow = (W+padding[1]*2-Kw*dilation[1]+dilation[1]-1)//stride[1]+1
    if w_ is None:
        assert 0
    else:
        w = w_
    xx = x.reindex([N,G,oc//G,CpG,oh,ow,Kh,Kw], [
        'i0', # Nid
        f'i1*{CpG}+i3', # Gid
        f'i4*{stride[0]}-{padding[0]}+i6*{dilation[0]}', # Hid+Khid
        f'i5*{stride[1]}-{padding[1]}+i7*{dilation[1]}', # Wid+KWid
    ])
    # w: [oc, CpG, Kh, Kw]
    ww = w.reindex([N, G, oc//G, CpG, oh, ow, Kh, Kw], [
        f'i1*{oc//G}+i2',
        'i3',
        'i6',
        'i7'
    ])
    yy = xx*ww
    y = yy.reindex_reduce('add', [N, oc, oh, ow], [
        'i0',
        f'i1*{oc//G}+i2',
        'i4',
        'i5'
    ])
    return y