self_supervision_benchmark/modeling/jigsaw/resnet_jigsaw_finetune_linear.py [219:248]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    )
    model.StopGradient(blob_in, blob_in)
    resize_c4 = model.AveragePool(
        blob_in, blob_in + '_s3k8_resize', stride=3, kernel=8, pad=0
    )
    bn_c4 = model.SpatialBN(
        resize_c4, resize_c4 + '_bn', 1024, 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_c4 + '_s'], bn_c4 + '_s', value=1.0
        )
        model.param_init_net.ConstantFill(
            [bn_c4 + '_b'], bn_c4 + '_b', value=0.0
        )
    fc_conv4 = model.FC(
        bn_c4, 'conv4_cls', 1024 * 3 * 3, num_classes,
        weight_init=('GaussianFill', {'std': 0.01}),
        bias_init=('ConstantFill', {'value': 0.0}),
    )
    model.net.Alias(fc_conv4, 'pred_conv4')
    if not cfg.MODEL.EXTRACT_FEATURES_ONLY:
        model.Accuracy([fc_conv4, labels], 'accuracy_conv4')
        if split == 'train':
            softmax, loss_c4 = model.SoftmaxWithLoss(
                ['pred_conv4', labels],
                ['softmax_conv4', 'loss_conv4'], scale=scale
            )
        elif split in ['test', 'val']:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



self_supervision_benchmark/modeling/supervised/resnet_supervised_finetune_linear.py [211:240]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    )
    model.StopGradient(blob_in, blob_in)
    resize_c4 = model.AveragePool(
        blob_in, blob_in + '_s3k8_resize', stride=3, kernel=8, pad=0
    )
    bn_c4 = model.SpatialBN(
        resize_c4, resize_c4 + '_bn', 1024, 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_c4 + '_s'], bn_c4 + '_s', value=1.0
        )
        model.param_init_net.ConstantFill(
            [bn_c4 + '_b'], bn_c4 + '_b', value=0.0
        )
    fc_conv4 = model.FC(
        bn_c4, 'conv4_cls', 1024 * 3 * 3, num_classes,
        weight_init=('GaussianFill', {'std': 0.01}),
        bias_init=('ConstantFill', {'value': 0.0}),
    )
    model.net.Alias(fc_conv4, 'pred_conv4')
    if not cfg.MODEL.EXTRACT_FEATURES_ONLY:
        model.Accuracy([fc_conv4, labels], 'accuracy_conv4')
        if split == 'train':
            softmax, loss_c4 = model.SoftmaxWithLoss(
                ['pred_conv4', labels],
                ['softmax_conv4', 'loss_conv4'], scale=scale
            )
        elif split in ['test', 'val']:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



