Exemple #1
0
def conv3d1x1(in_planes, out_planes, stride=1):
    """1x1 convolution"""
    ret = nn.Conv3d(in_planes,
                    out_planes,
                    kernel_size=1,
                    stride=stride,
                    bias=True)
    ret.apply(KaimingNormalWeightsZeroBias())
    return ret
Exemple #2
0
def conv3d3x3(in_planes, out_planes, stride=1):
    """3x3 convolution with padding"""
    ret = nn.Conv3d(in_planes,
                    out_planes,
                    kernel_size=3,
                    stride=stride,
                    padding=1,
                    bias=True)
    ret.apply(KaimingNormalWeightsZeroBias())
    return ret