self_supervision_benchmark/modeling/colorization/resnet_colorize_finetune_linear.py [144:178]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    )
    model.StopGradient(blob_in, blob_in)
    resize_c2 = model.AveragePool(
        blob_in, blob_in + '_s8k16_resize', stride=8, kernel=16, pad=0
    )
    bn_c2 = model.SpatialBN(
        resize_c2, resize_c2 + '_bn', 256, 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_c2 + '_s'], bn_c2 + '_s', value=1.0
        )
        model.param_init_net.ConstantFill(
            [bn_c2 + '_b'], bn_c2 + '_b', value=0.0
        )
    fc_conv2 = model.FC(
        bn_c2, 'conv2_cls', 256 * 6 * 6, num_classes,
        weight_init=('GaussianFill', {'std': 0.01}),
        bias_init=('ConstantFill', {'value': 0.0}),
    )
    model.net.Alias(fc_conv2, 'pred_conv2')
    if not cfg.MODEL.EXTRACT_FEATURES_ONLY:
        model.Accuracy([fc_conv2, labels], 'accuracy_conv2')
        if split == 'train':
            softmax, loss_c2 = model.SoftmaxWithLoss(
                ['pred_conv2', labels], ['softmax_conv2', 'loss_conv2'],
                scale=scale
            )
        elif split in ['test', 'val']:
            softmax = model.Softmax(
                'pred_conv2', 'softmax_conv2', engine='CUDNN'
            )
            loss_c2 = None
        losses.append(loss_c2)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



self_supervision_benchmark/modeling/jigsaw/resnet_jigsaw_finetune_linear.py [139:173]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    )
    model.StopGradient(blob_in, blob_in)
    resize_c2 = model.AveragePool(
        blob_in, blob_in + '_s8k16_resize', stride=8, kernel=16, pad=0
    )
    bn_c2 = model.SpatialBN(
        resize_c2, resize_c2 + '_bn', 256, 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_c2 + '_s'], bn_c2 + '_s', value=1.0
        )
        model.param_init_net.ConstantFill(
            [bn_c2 + '_b'], bn_c2 + '_b', value=0.0
        )
    fc_conv2 = model.FC(
        bn_c2, 'conv2_cls', 256 * 6 * 6, num_classes,
        weight_init=('GaussianFill', {'std': 0.01}),
        bias_init=('ConstantFill', {'value': 0.0}),
    )
    model.net.Alias(fc_conv2, 'pred_conv2')
    if not cfg.MODEL.EXTRACT_FEATURES_ONLY:
        model.Accuracy([fc_conv2, labels], 'accuracy_conv2')
        if split == 'train':
            softmax, loss_c2 = model.SoftmaxWithLoss(
                ['pred_conv2', labels], ['softmax_conv2', 'loss_conv2'],
                scale=scale
            )
        elif split in ['test', 'val']:
            softmax = model.Softmax(
                'pred_conv2', 'softmax_conv2', engine='CUDNN'
            )
            loss_c2 = None
        losses.append(loss_c2)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



