configs/config/benchmark/robustness_out_of_distribution/imagenet_a/eval_resnet_8gpu_robustness_in1k_linear.yaml [48:115]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  METERS:
    name: accuracy_list_meter
    accuracy_list_meter:
      num_meters: 2
      topk_values: [1, 5]
  TRAINER:
    TRAIN_STEP_NAME: standard_train_step
  MODEL:
    FEATURE_EVAL_SETTINGS:
      EVAL_MODE_ON: True
      FREEZE_TRUNK_ONLY: True
      SHOULD_FLATTEN_FEATS: False
      LINEAR_EVAL_FEAT_POOL_OPS_MAP: [
        ["res5", ["AdaptiveAvgPool2d", [[2, 2]]]],
        ["res5avg", ["Identity", []]],
      ]
    TRUNK:
      NAME: resnet
      RESNETS:
        DEPTH: 50
    HEAD:
      PARAMS: [
        ["eval_mlp", {"in_channels": 2048, "dims": [8192, 1000]}],
        ["eval_mlp", {"in_channels": 2048, "dims": [2048, 1000]}],
      ]
    WEIGHTS_INIT:
      PARAMS_FILE: "specify the model weights"
      STATE_DICT_KEY_NAME: classy_state_dict
      # STATE_DICT_KEY_NAME: model_state_dict
    SYNC_BN_CONFIG:
      CONVERT_BN_TO_SYNC_BN: True
      SYNC_BN_TYPE: apex
      GROUP_SIZE: 8
  LOSS:
    name: cross_entropy_multiple_output_single_target
    cross_entropy_multiple_output_single_target:
      ignore_index: -1
  OPTIMIZER:
      name: sgd
      # In the OSS Caffe2 benchmark, RN50 models use 1e-4 and AlexNet models 5e-4
      weight_decay: 0.0005
      momentum: 0.9
      num_epochs: 28
      nesterov: True
      regularize_bn: False
      regularize_bias: True
      param_schedulers:
        lr:
          auto_lr_scaling:
            auto_scale: true
            base_value: 0.01
            base_lr_batch_size: 256
          name: multistep
          values: [0.01, 0.001, 0.0001, 0.00001]
          milestones: [8, 16, 24]
          update_interval: epoch
  DISTRIBUTED:
    BACKEND: nccl
    NUM_NODES: 1
    NUM_PROC_PER_NODE: 8
    INIT_METHOD: tcp
    RUN_ID: auto
  MACHINE:
    DEVICE: gpu
  CHECKPOINT:
    DIR: "."
    AUTO_RESUME: True
    CHECKPOINT_FREQUENCY: 1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



configs/config/benchmark/robustness_out_of_distribution/imagenet_r/eval_resnet_8gpu_robustness_in1k_linear.yaml [48:115]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  METERS:
    name: accuracy_list_meter
    accuracy_list_meter:
      num_meters: 2
      topk_values: [1, 5]
  TRAINER:
    TRAIN_STEP_NAME: standard_train_step
  MODEL:
    FEATURE_EVAL_SETTINGS:
      EVAL_MODE_ON: True
      FREEZE_TRUNK_ONLY: True
      SHOULD_FLATTEN_FEATS: False
      LINEAR_EVAL_FEAT_POOL_OPS_MAP: [
        ["res5", ["AdaptiveAvgPool2d", [[2, 2]]]],
        ["res5avg", ["Identity", []]],
      ]
    TRUNK:
      NAME: resnet
      RESNETS:
        DEPTH: 50
    HEAD:
      PARAMS: [
        ["eval_mlp", {"in_channels": 2048, "dims": [8192, 1000]}],
        ["eval_mlp", {"in_channels": 2048, "dims": [2048, 1000]}],
      ]
    WEIGHTS_INIT:
      PARAMS_FILE: "specify the model weights"
      STATE_DICT_KEY_NAME: classy_state_dict
      # STATE_DICT_KEY_NAME: model_state_dict
    SYNC_BN_CONFIG:
      CONVERT_BN_TO_SYNC_BN: True
      SYNC_BN_TYPE: apex
      GROUP_SIZE: 8
  LOSS:
    name: cross_entropy_multiple_output_single_target
    cross_entropy_multiple_output_single_target:
      ignore_index: -1
  OPTIMIZER:
      name: sgd
      # In the OSS Caffe2 benchmark, RN50 models use 1e-4 and AlexNet models 5e-4
      weight_decay: 0.0005
      momentum: 0.9
      num_epochs: 28
      nesterov: True
      regularize_bn: False
      regularize_bias: True
      param_schedulers:
        lr:
          auto_lr_scaling:
            auto_scale: true
            base_value: 0.01
            base_lr_batch_size: 256
          name: multistep
          values: [0.01, 0.001, 0.0001, 0.00001]
          milestones: [8, 16, 24]
          update_interval: epoch
  DISTRIBUTED:
    BACKEND: nccl
    NUM_NODES: 1
    NUM_PROC_PER_NODE: 8
    INIT_METHOD: tcp
    RUN_ID: auto
  MACHINE:
    DEVICE: gpu
  CHECKPOINT:
    DIR: "."
    AUTO_RESUME: True
    CHECKPOINT_FREQUENCY: 1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



