# MobileNetV3-large_1.0 ImageNet classification: ~75.7% top-1.
runtime:
  distribution_strategy: 'tpu'
  mixed_precision_dtype: 'bfloat16'
task:
  model:
    num_classes: 1001
    input_size: [224, 224, 3]
    backbone:
      type: 'mobilenet'
      mobilenet:
        model_id: 'MobileNetV3Large'
        filter_size_scale: 1.0
    kernel_initializer: 'random_uniform'
    norm_activation:
      norm_epsilon: 0.001
      norm_momentum: 0.997
    dropout_rate: 0.2
  losses:
    l2_weight_decay: 0.0
    one_hot: true
    label_smoothing: 0.1
  train_data:
    input_path: 'gs://mlcompass-data/imagenet/imagenet-2012-tfrecord/train*'
    is_training: true
    global_batch_size: 4096
    dtype: 'bfloat16'
    aug_type:
      autoaug:
        augmentation_name: 'v0'
        cutout_const: 100
        translate_const: 250
      type: 'autoaug'
  validation_data:
    input_path: 'gs://mlcompass-data/imagenet/imagenet-2012-tfrecord/valid*'
    is_training: false
    global_batch_size: 4096
    dtype: 'bfloat16'
    drop_remainder: false
trainer:
  train_steps: 218000  # 700 epochs
  validation_steps: 13
  validation_interval: 312
  steps_per_loop: 312  # NUM_EXAMPLES (1281167) // global_batch_size
  summary_interval: 312
  checkpoint_interval: 312
  optimizer_config:
    learning_rate:
      cosine:
        alpha: 0.0
        decay_steps: 218000
        initial_learning_rate: 0.004
        name: CosineDecay
        offset: 0
      type: 'cosine'
    optimizer:
      adamw:
        amsgrad: false
        beta_1: 0.9
        beta_2: 0.999
        clipnorm: null
        clipvalue: null
        epsilon: 1.0e-07
        exclude_from_weight_decay: ['batch_normalization']
        global_clipnorm: null
        gradient_clip_norm: 0.0
        include_in_weight_decay: null
        name: 'AdamWeightDecay'
        weight_decay_rate: 0.1
      type: 'adamw'
