def __init__(self, inplanes, planes, stride, dilation, downsample=None, expansion=4):
    super(Bottleneck, self).__init__()
    self.expansion = expansion
    self.conv1 = conv1x1(inplanes, planes)
    self.bn1 = nn.BatchNorm2d(planes)
    self.conv2 = conv3x3(planes, planes, stride, dilation, dilation)
    self.bn2 = nn.BatchNorm2d(planes)
    self.conv3 = conv1x1(planes, (planes * self.expansion))
    self.bn3 = nn.BatchNorm2d((planes * self.expansion))
    self.relu = nn.ReLU(inplace=True)
    self.downsample = downsample
    self.stride = stride
def __init__(self, inplanes, planes, stride, dilation, downsample=None, expansion=4):
    super(Bottleneck, self).__init__()
    self.expansion = expansion
    self.conv1 = conv1x1(inplanes, planes)
    self.bn1 = nn.BatchNorm2d(planes)
    self.conv2 = conv3x3(planes, planes, stride, dilation, dilation)
    self.bn2 = nn.BatchNorm2d(planes)
    self.conv3 = conv1x1(planes, (planes * self.expansion))
    self.bn3 = nn.BatchNorm2d((planes * self.expansion))
    self.relu = nn.ReLU(inplace=True)
    self.downsample = downsample
    self.stride = stride