self_supervision_benchmark/modeling/colorization/resnet_colorize_finetune_linear.py [62:96]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    )
    bn_blob = model.SpatialBN(
        conv_blob, 'res_conv1_bn', 64, epsilon=cfg.MODEL.BN_EPSILON,
        momentum=cfg.MODEL.BN_MOMENTUM, is_test=True,
    )
    relu_blob = model.Relu(bn_blob, bn_blob)
    model.StopGradient(relu_blob, relu_blob)
    resize_c1 = model.AveragePool(
        relu_blob, relu_blob + '_resize', kernel=10, stride=10, pad=4
    )
    bn_c1 = model.SpatialBN(
        resize_c1, resize_c1 + '_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_c1 + '_s'], bn_c1 + '_s', value=1.0
        )
        model.param_init_net.ConstantFill(
            [bn_c1 + '_b'], bn_c1 + '_b', value=0.0
        )
    fc_conv1 = model.FC(
        bn_c1, 'conv1_cls', 64 * 12 * 12, num_classes,
        weight_init=('GaussianFill', {'std': 0.01}),
        bias_init=('ConstantFill', {'value': 0.0}),
    )
    model.net.Alias(fc_conv1, 'pred_conv1')
    if not cfg.MODEL.EXTRACT_FEATURES_ONLY:
        model.Accuracy([fc_conv1, labels], 'accuracy_conv1')
        if split == 'train':
            softmax, loss_c1 = model.SoftmaxWithLoss(
                ['pred_conv1', labels],
                ['softmax_conv1', 'loss_conv1'], scale=scale
            )
        elif split in ['test', 'val']:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



self_supervision_benchmark/modeling/supervised/resnet_supervised_finetune_linear.py [56:90]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    )
    bn_blob = model.SpatialBN(
        conv_blob, 'res_conv1_bn', 64, epsilon=cfg.MODEL.BN_EPSILON,
        momentum=cfg.MODEL.BN_MOMENTUM, is_test=True,
    )
    relu_blob = model.Relu(bn_blob, bn_blob)
    model.StopGradient(relu_blob, relu_blob)
    resize_c1 = model.AveragePool(
        relu_blob, relu_blob + '_resize', kernel=10, stride=10, pad=4
    )
    bn_c1 = model.SpatialBN(
        resize_c1, resize_c1 + '_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_c1 + '_s'], bn_c1 + '_s', value=1.0
        )
        model.param_init_net.ConstantFill(
            [bn_c1 + '_b'], bn_c1 + '_b', value=0.0
        )
    fc_conv1 = model.FC(
        bn_c1, 'conv1_cls', 64 * 12 * 12, num_classes,
        weight_init=('GaussianFill', {'std': 0.01}),
        bias_init=('ConstantFill', {'value': 0.0}),
    )
    model.net.Alias(fc_conv1, 'pred_conv1')
    if not cfg.MODEL.EXTRACT_FEATURES_ONLY:
        model.Accuracy([fc_conv1, labels], 'accuracy_conv1')
        if split == 'train':
            softmax, loss_c1 = model.SoftmaxWithLoss(
                ['pred_conv1', labels],
                ['softmax_conv1', 'loss_conv1'], scale=scale
            )
        elif split in ['test', 'val']:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



