Ejemplo n.º 1
0
def conv3x3(in_planes, out_planes, bitW, stride=1):
    "3x3 convolution with padding"
    return self_conv(in_planes,
                     out_planes,
                     bitW,
                     kernel_size=3,
                     stride=stride,
                     padding=1,
                     bias=False)
Ejemplo n.º 2
0
 def __init__(self,
              inplanes,
              planes,
              bitW,
              kernel_size=1,
              stride=1,
              bias=False):
     super(downsample_layer, self).__init__()
     self.conv = self_conv(inplanes,
                           planes,
                           bitW,
                           kernel_size=kernel_size,
                           stride=stride,
                           bias=False)
     self.batch_norm = nn.BatchNorm2d(planes)