runtime:
  distribution_strategy: 'mirrored'
  mixed_precision_dtype: 'float32'
  loss_scale: 'dynamic'
task:
  model:
    num_classes: 1001
    input_size: [224, 224, 3]
    backbone:
      type: 'resnet'
      resnet:
        model_id: 50
  losses:
    l2_weight_decay: 0.0001
    one_hot: true
    label_smoothing: 0.1
  train_data:
    input_path: '/readahead/200M/placer/prod/home/distbelief/imagenet-tensorflow/imagenet-2012-tfrecord/train*'
    is_training: true
    global_batch_size: 256
    dtype: 'float32'
  validation_data:
    input_path: '/readahead/200M/placer/prod/home/distbelief/imagenet-tensorflow/imagenet-2012-tfrecord/valid*'
    is_training: false
    global_batch_size: 256
    dtype: 'float32'
    drop_remainder: false
  quantization:
    pretrained_original_checkpoint: 'gs://**/resnet_classifier_gpu/ckpt-56160'
trainer:
  # With below setting, the accuracy of QAT reaches to the non-quantized float32 version after
  # around 160k steps, which takes 1d 15h with 8 GPUS.
  train_steps: 449280
  validation_steps: 200
  validation_interval: 5000
  steps_per_loop: 5000
  summary_interval: 5000
  checkpoint_interval: 5000
  optimizer_config:
    optimizer:
      type: 'sgd'
      sgd:
        momentum: 0.9
    learning_rate:
      type: 'exponential'
      exponential:
        initial_learning_rate: 0.016
        decay_steps: 25000
        decay_rate: 0.5
        staircase: true
    warmup:
      type: 'linear'
      linear:
        warmup_steps: 1000
