def __init__(self, inplanes, planes, groups, stride=1, downsample=None): super(BasicBlock, self).__init__() self.downsample = downsample self.conv = SemanticMultiGroupConv(inplanes, planes, kernel_size=3, stride=stride, groups=groups)
def __init__(self, in_channels, num_joints): super(SemanticBlock, self).__init__() ### 3x3 group conv: in_channels --> in_channels self.conv_1 = nn.Conv2d(in_channels, in_channels, padding=1, bias=False, kernel_size=3, groups=num_joints) self.bn1 = nn.BatchNorm2d(in_channels, momentum=BN_MOMENTUM) self.bn2 = nn.BatchNorm2d(in_channels, momentum=BN_MOMENTUM) self.relu = nn.ReLU(inplace=True) ### 3x3 Semantic conv: in_channels --> in_channels self.conv_2 = SemanticMultiGroupConv(in_channels, in_channels, kernel_size=3, stride=1, padding=1, groups=num_joints)