mmf/projects/vilt/configs/masked_coco/defaults.yaml [1:98]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
other_configs:
  image_w: 224
  image_h: 224
  hidden_size: 768

dataset_config:
  masked_coco:
    zoo_requirements:
    - coco.defaults
    return_features_info: true
    use_features: false
    use_images: true
    processors:
      image_processor:
        type: vilt_image_processor
        params:
          size:
          - ${other_configs.image_w}
          - ${other_configs.image_h}
      text_processor:
        type: vilt_text_tokenizer
        params:
          mask_probability: 0
          max_seq_length: 25
    images:
      train:
      - coco/defaults/images/train2014
      - coco/defaults/images/val2014
      - coco/defaults/images/train2014
      - coco/defaults/images/val2014
      - coco/defaults/images/val2014
      val:
      - coco/defaults/images/val2014
      test:
      - coco/defaults/images/test2015

model_config:
  masked_coco:
    tasks: ${datasets}
    heads:
      masked_coco:
        - type: multilayer_mlp
          loss: masked_coco_mlp
          num_labels: 3129

    losses:
      masked_coco_mlp: logit_bce

    image_encoder:
      type: vit
      params:
        random_init: True
        pretrained_model_name: google/vit-base-patch16-224
        gradient_checkpointing: false
        do_pooling: false
        hidden_dropout_prob: 0
        add_pooling_layer: False
        do_patch_embeddings: False
        image_size:
        - ${other_configs.image_w}
        - ${other_configs.image_h}
        regularize_bn: False
        regularize_bias: True
        hidden_dim: ${other_configs.hidden_size}
        pretrained_model: vit_base_patch16_224
        mlp_dim: 3072

    text_embeddings:
      type: vilt_text_embedding
      params:
        bert_model_name: bert-base-uncased
        hidden_dim: ${other_configs.hidden_size}
        hidden_size: 768


training:
  clip_gradients: false
  lr_scheduler: true
  max_updates: 44000
  checkpoint_interval: 4000
  evaluation_interval: 4000
  batch_size: 256 # 32 per GPU * 8 GPU
  find_unused_parameters: false
  log_interval: 1000

optimizer:
  type: adam_w
  params:
    lr: 1e-4
    eps: 1e-8
    weight_decay: 1e-2


scheduler:
  type: warmup_cosine
  params:
    num_warmup_steps: 4400
    num_training_steps: ${training.max_updates}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



projects/vilt/configs/masked_coco/defaults.yaml [1:98]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
other_configs:
  image_w: 224
  image_h: 224
  hidden_size: 768

dataset_config:
  masked_coco:
    zoo_requirements:
    - coco.defaults
    return_features_info: true
    use_features: false
    use_images: true
    processors:
      image_processor:
        type: vilt_image_processor
        params:
          size:
          - ${other_configs.image_w}
          - ${other_configs.image_h}
      text_processor:
        type: vilt_text_tokenizer
        params:
          mask_probability: 0
          max_seq_length: 25
    images:
      train:
      - coco/defaults/images/train2014
      - coco/defaults/images/val2014
      - coco/defaults/images/train2014
      - coco/defaults/images/val2014
      - coco/defaults/images/val2014
      val:
      - coco/defaults/images/val2014
      test:
      - coco/defaults/images/test2015

model_config:
  masked_coco:
    tasks: ${datasets}
    heads:
      masked_coco:
        - type: multilayer_mlp
          loss: masked_coco_mlp
          num_labels: 3129

    losses:
      masked_coco_mlp: logit_bce

    image_encoder:
      type: vit
      params:
        random_init: True
        pretrained_model_name: google/vit-base-patch16-224
        gradient_checkpointing: false
        do_pooling: false
        hidden_dropout_prob: 0
        add_pooling_layer: False
        do_patch_embeddings: False
        image_size:
        - ${other_configs.image_w}
        - ${other_configs.image_h}
        regularize_bn: False
        regularize_bias: True
        hidden_dim: ${other_configs.hidden_size}
        pretrained_model: vit_base_patch16_224
        mlp_dim: 3072

    text_embeddings:
      type: vilt_text_embedding
      params:
        bert_model_name: bert-base-uncased
        hidden_dim: ${other_configs.hidden_size}
        hidden_size: 768


training:
  clip_gradients: false
  lr_scheduler: true
  max_updates: 44000
  checkpoint_interval: 4000
  evaluation_interval: 4000
  batch_size: 256 # 32 per GPU * 8 GPU
  find_unused_parameters: false
  log_interval: 1000

optimizer:
  type: adam_w
  params:
    lr: 1e-4
    eps: 1e-8
    weight_decay: 1e-2


scheduler:
  type: warmup_cosine
  params:
    num_warmup_steps: 4400
    num_training_steps: ${training.max_updates}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



