def __init__(self, inplanes, planes, stride=1, dropout=0.0):
super(INSResBlock, self).__init__()
model = []
model += [self.conv3x3(inplanes, planes, stride)]
model += [nn.InstanceNorm2d(planes)]
model += [nn.ReLU(inplace=True)]
model += [self.conv3x3(planes, planes)]
model += [nn.InstanceNorm2d(planes)]
After Change
def __init__(self, inplanes, planes, stride=1, dropout=0.0):
super(INSResBlock, self).__init__()
model = []
model += self.conv3x3(inplanes, planes, stride)
model += [nn.InstanceNorm2d(planes)]
model += [nn.ReLU(inplace=True)]
model += self.conv3x3(planes, planes)
model += [nn.InstanceNorm2d(planes)]