def __init__(self, fc_out_channels=1024, *args, **kwargs):
    loss_dis = kwargs['loss_dis']
    self.reference_labels = kwargs['reference_labels']
    self.classes = kwargs['classes']
    self.dis_selector = kwargs['dis_selector']
    assert (self.dis_selector in (0, 1, 2))
    kwargs.pop('loss_dis')
    kwargs.pop('reference_labels')
    kwargs.pop('classes')
    kwargs.pop('dis_selector')
    super(Shared2FCBBoxHeadLeaves, self).__init__(*args, num_shared_convs=0, num_shared_fcs=2, num_cls_convs=0, num_cls_fcs=0, num_reg_convs=0, num_reg_fcs=0, fc_out_channels=fc_out_channels, with_dis=True, num_dis_convs=0, num_dis_fcs=0, **kwargs)
    if ((self.dis_selector == 0) or (self.dis_selector == 1)):
        assert loss_dis['use_sigmoid'], 'used invalid loss_dis'
    elif (self.dis_selector == 2):
        assert (not loss_dis['use_sigmoid']), 'used invalid loss_dis'
    self.loss_dis = build_loss(loss_dis)
def __init__(self, fc_out_channels=1024, *args, **kwargs):
    loss_dis = kwargs['loss_dis']
    self.reference_labels = kwargs['reference_labels']
    self.classes = kwargs['classes']
    self.dis_selector = kwargs['dis_selector']
    assert (self.dis_selector in (0, 1, 2))
    kwargs.pop('loss_dis')
    kwargs.pop('reference_labels')
    kwargs.pop('classes')
    kwargs.pop('dis_selector')
    super(Shared2FCBBoxHeadLeaves, self).__init__(*args, num_shared_convs=0, num_shared_fcs=2, num_cls_convs=0, num_cls_fcs=0, num_reg_convs=0, num_reg_fcs=0, fc_out_channels=fc_out_channels, with_dis=True, num_dis_convs=0, num_dis_fcs=0, **kwargs)
    if ((self.dis_selector == 0) or (self.dis_selector == 1)):
        assert loss_dis['use_sigmoid'], 'used invalid loss_dis'
    elif (self.dis_selector == 2):
        assert (not loss_dis['use_sigmoid']), 'used invalid loss_dis'
    self.loss_dis = build_loss(loss_dis)