def __init__(self, in_channels, inner_channel, norm_layer=nn.BatchNorm2d):
    super(ObjectContext, self).__init__()
    self.in_channels = in_channels
    self.inner_channel = inner_channel
    self.reduce_conv = ConvBnRelu(self.in_channels, self.inner_channel, 1, 1, 0, has_bn=True, has_relu=True, has_bias=False, norm_layer=norm_layer)
    self.intra_similarity_branch = nn.Sequential(ConvBnRelu(self.inner_channel, self.inner_channel, 1, 1, 0, has_bn=True, has_relu=True, has_bias=False, norm_layer=norm_layer), ConvBnRelu(self.inner_channel, 3600, 1, 1, 0, has_bn=True, has_relu=False, has_bias=False, norm_layer=norm_layer))
    self.intra_post_conv = ConvBnRelu(self.inner_channel, self.inner_channel, 1, 1, 0, has_bn=True, has_relu=True, has_bias=False, norm_layer=norm_layer)
    self.inter_post_conv = ConvBnRelu(self.inner_channel, self.inner_channel, 1, 1, 0, has_bn=True, has_relu=True, has_bias=False, norm_layer=norm_layer)
def __init__(self, in_channels, inner_channel, norm_layer=nn.BatchNorm2d):
    super(ObjectContext, self).__init__()
    self.in_channels = in_channels
    self.inner_channel = inner_channel
    self.reduce_conv = ConvBnRelu(self.in_channels, self.inner_channel, 1, 1, 0, has_bn=True, has_relu=True, has_bias=False, norm_layer=norm_layer)
    self.intra_similarity_branch = nn.Sequential(ConvBnRelu(self.inner_channel, self.inner_channel, 1, 1, 0, has_bn=True, has_relu=True, has_bias=False, norm_layer=norm_layer), ConvBnRelu(self.inner_channel, 3600, 1, 1, 0, has_bn=True, has_relu=False, has_bias=False, norm_layer=norm_layer))
    self.intra_post_conv = ConvBnRelu(self.inner_channel, self.inner_channel, 1, 1, 0, has_bn=True, has_relu=True, has_bias=False, norm_layer=norm_layer)
    self.inter_post_conv = ConvBnRelu(self.inner_channel, self.inner_channel, 1, 1, 0, has_bn=True, has_relu=True, has_bias=False, norm_layer=norm_layer)