self_supervision_benchmark/modeling/jigsaw/resnet_jigsaw_finetune_linear.py [103:133]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    resize_pool1 = model.AveragePool(
        max_pool, max_pool + '_resize', kernel=5, stride=5, pad=2
    )
    bn_pool1 = model.SpatialBN(
        resize_pool1, resize_pool1 + '_bn', 64, epsilon=cfg.MODEL.BN_EPSILON,
        momentum=cfg.MODEL.BN_MOMENTUM, is_test=test_mode
    )
    if cfg.MODEL.BN_NO_SCALE_SHIFT:
        model.param_init_net.ConstantFill(
            [bn_pool1 + '_s'], bn_pool1 + '_s', value=1.0
        )
        model.param_init_net.ConstantFill(
            [bn_pool1 + '_b'], bn_pool1 + '_b', value=0.0
        )
    fc_pool1 = model.FC(
        bn_pool1, 'pool1_cls', 64 * 12 * 12, num_classes,
        weight_init=('GaussianFill', {'std': 0.01}),
        bias_init=('ConstantFill', {'value': 0.0}),
    )
    model.net.Alias(fc_pool1, 'pred_pool1')
    if not cfg.MODEL.EXTRACT_FEATURES_ONLY:
        model.Accuracy([fc_pool1, labels], 'accuracy_poo1')
        if split == 'train':
            softmax, loss_pool1 = model.SoftmaxWithLoss(
                ['pred_pool1', labels],
                ['softmax_pool1', 'loss_pool1'], scale=scale
            )
        elif split in ['test', 'val']:
            softmax = model.Softmax('pred_pool1', 'softmax_pool1', engine='CUDNN')
            loss_pool1 = None
        losses.append(loss_pool1)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



self_supervision_benchmark/modeling/supervised/resnet_supervised_finetune_linear.py [98:128]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    resize_pool1 = model.AveragePool(
        max_pool, max_pool + '_resize', kernel=5, stride=5, pad=2
    )
    bn_pool1 = model.SpatialBN(
        resize_pool1, resize_pool1 + '_bn', 64, epsilon=cfg.MODEL.BN_EPSILON,
        momentum=cfg.MODEL.BN_MOMENTUM, is_test=test_mode
    )
    if cfg.MODEL.BN_NO_SCALE_SHIFT:
        model.param_init_net.ConstantFill(
            [bn_pool1 + '_s'], bn_pool1 + '_s', value=1.0
        )
        model.param_init_net.ConstantFill(
            [bn_pool1 + '_b'], bn_pool1 + '_b', value=0.0
        )
    fc_pool1 = model.FC(
        bn_pool1, 'pool1_cls', 64 * 12 * 12, num_classes,
        weight_init=('GaussianFill', {'std': 0.01}),
        bias_init=('ConstantFill', {'value': 0.0}),
    )
    model.net.Alias(fc_pool1, 'pred_pool1')
    if not cfg.MODEL.EXTRACT_FEATURES_ONLY:
        model.Accuracy([fc_pool1, labels], 'accuracy_poo1')
        if split == 'train':
            softmax, loss_pool1 = model.SoftmaxWithLoss(
                ['pred_pool1', labels],
                ['softmax_pool1', 'loss_pool1'], scale=scale
            )
        elif split in ['test', 'val']:
            softmax = model.Softmax('pred_pool1', 'softmax_pool1', engine='CUDNN')
            loss_pool1 = None
        losses.append(loss_pool1)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



