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'
    change_num_bits: true
    num_bits_weight: 4
    num_bits_activation: 8
trainer:
  # With below setting, the accuracy of QAT reaches Top1-accuracy 0.7575 at 220k steps with 8GPUs.
  # TODO: Please change the configs when training is done.
  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
