dataloader:
  test:
  - _target_: libai.data.build_image_test_loader
    dataset:
      _target_: libai.data.datasets.ImageNetDataset
      root: /ssd/dataset/ImageNet/extract
      train: false
      transform:
        _target_: flowvision.transforms.Compose
        transforms:
        - _target_: flowvision.transforms.Resize
          interpolation: &id001 !!python/object/apply:flowvision.transforms.functional.InterpolationMode [bicubic]
          size: 256
        - {_target_: flowvision.transforms.CenterCrop, size: 224}
        - {_target_: flowvision.transforms.ToTensor}
        - _target_: flowvision.transforms.Normalize
          mean: [0.485, 0.456, 0.406]
          std: [0.229, 0.224, 0.225]
    num_workers: 4
  train:
    _target_: libai.data.build_image_train_loader
    dataset:
    - _target_: libai.data.datasets.ImageNetDataset
      root: /ssd/dataset/ImageNet/extract
      train: true
      transform:
        _target_: flowvision.transforms.Compose
        transforms:
        - _target_: flowvision.transforms.RandomResizedCrop
          interpolation: *id001
          ratio: [0.75, 1.3333333333333333]
          scale: [0.08, 1.0]
          size: 224
        - {_target_: flowvision.transforms.RandomHorizontalFlip, p: 0.5}
        - _target_: flowvision.data.rand_augment_transform
          config_str: rand-m9-mstd0.5-inc1
          hparams:
            img_mean: [124, 116, 104]
            interpolation: 3
            translate_const: 100
        - {_target_: flowvision.transforms.ToTensor}
        - _target_: flowvision.transforms.Normalize
          mean: [0.485, 0.456, 0.406]
          std: [0.229, 0.224, 0.225]
        - {_target_: flowvision.data.RandomErasing, device: cpu, max_count: 1, mode: pixel, num_splits: 0, probability: 0.25}
    mixup_func: {_target_: flowvision.data.Mixup, cutmix_alpha: 1.0, mixup_alpha: 0.8, mode: batch, num_classes: 1000, prob: 1.0, switch_prob: 0.5}
    num_workers: 4
graph:
  auto_parallel: {enable_auto_parallel_ignore_user_sbp_config: false, enabled: false, sbp_collector: false, trunk_algo: true}
  debug: -1
  enabled: true
  eval_graph: {_target_: libai.models.utils.GraphBase, is_train: false}
  train_graph: {_target_: libai.models.utils.GraphBase, is_train: true}
model:
  _target_: libai.models.SwinTransformer
  cfg:
    ape: false
    attention_probs_dropout_prob: 0.1
    bias_dropout_fusion: true
    depths: [2, 2, 6, 2]
    drop_path_rate: 0.2
    drop_rate: 0.0
    embed_dim: 96
    ffn_hidden_size: 3072
    head_size: 64
    hidden_dropout_prob: 0.1
    hidden_layers: 12
    hidden_size: 768
    img_size: 224
    in_chans: 3
    intermediate_size: 3072
    loss_func: !!python/object:flowvision.loss.cross_entropy.SoftTargetCrossEntropy
      _buffers: !!python/object/apply:collections.OrderedDict
      - []
      _is_ddp_module: false
      _modules: !!python/object/apply:collections.OrderedDict
      - []
      _oneflow_internal_module_tensor_applied_dict__: null
      _parameters: !!python/object/apply:collections.OrderedDict
      - []
      training: true
    mlp_ratio: 4.0
    num_attention_heads: 12
    num_classes: 1000
    num_heads: [3, 6, 12, 24]
    patch_norm: true
    patch_size: 4
    qk_scale: null
    qkv_bias: true
    window_size: 7
optim:
  _target_: oneflow.nn.optimizer.adamw.AdamW
  betas: [0.9, 0.999]
  do_bias_correction: true
  eps: 1.0e-08
  lr: 0.001
  params: {_target_: libai.optim.get_default_optimizer_params, clip_grad_max_norm: null, clip_grad_norm_type: null, weight_decay_bias: 0.0, weight_decay_norm: 0.0}
  weight_decay: 0.05
train:
  activation_checkpoint: {enabled: true}
  amp: {enabled: true}
  checkpointer: {max_to_keep: 100, period: 5000, save_model_after_n_epoch: null}
  consumed_train_samples: 0
  consumed_valid_samples: 0
  dist: {custom_pipeline_stage_id: null, data_parallel_size: 1, num_gpus_per_node: 4, num_nodes: 1, pipeline_num_layers: 12, pipeline_parallel_size: 1, tensor_parallel_size: 4}
  eval_period: 1562
  evaluation:
    enabled: false
    eval_after_n_epoch: null
    eval_iter: 100000.0
    eval_metric: Acc@1
    eval_mode: max
    eval_period: 5000
    evaluator:
      _target_: libai.evaluation.ClsEvaluator
      topk: [1, 5]
  global_batch_size: 256
  input_placement_device: cuda
  load_weight: ''
  log_period: 100
  nccl_fusion_max_ops: 24
  nccl_fusion_threshold_mb: 16
  num_accumulation_steps: 1
  output_dir: test_logs/oneflow-28/NVIDIA_GeForce_RTX_3080_Ti/7d07caf/LibAI_swin_imagenet_graph_nl12_nah12_hs768_FP16_actrue_DP1_MP4_PP1_zerotrue_stage2_mbs256_gbs256_acc1_1n4g
  rdma_enabled: true
  resume: false
  samples: 56320
  scheduler: {_target_: libai.scheduler.WarmupCosineLR, alpha: 0.01, warmup_factor: 0.001, warmup_method: linear}
  seed: 1234
  start_iter: 0
  test_micro_batch_size: 128
  train_epoch: 0
  train_iter: 220
  train_micro_batch_size: 256
  train_samples: null
  warmup_ratio: 0.06666666666666667
  zero_optimization: {enabled: true, stage: 2}
