runtime:
  distribution_strategy: 'mirrored'
  mixed_precision_dtype: 'float32'
task:
  model:
    num_classes: 1001
    input_size: [256, 256, 3]
    backbone:
      type: 'darknet'
      darknet:
        model_id: 'cspdarknet53'
    norm_activation:
      activation: 'mish'
  losses:
    l2_weight_decay: 0.0005
    one_hot: true
    label_smoothing: 0.1
  train_data:
    input_path: 'imagenet-2012-tfrecord/train*'
    is_training: true
    global_batch_size: 128
    dtype: 'float16'
  validation_data:
    input_path: 'imagenet-2012-tfrecord/valid*'
    is_training: true
    global_batch_size: 128
    dtype: 'float16'
    drop_remainder: false
trainer:
  train_steps: 1200000  # epochs: 120
  validation_steps: 400  # size of validation data
  validation_interval: 10000
  steps_per_loop: 10000
  summary_interval: 10000
  checkpoint_interval: 10000
  optimizer_config:
    optimizer:
      type: 'sgd'
      sgd:
        momentum: 0.9
    learning_rate:
      type: 'polynomial'
      polynomial:
        initial_learning_rate: 0.1
        end_learning_rate: 0.0001
        power: 4.0
        decay_steps: 1200000
    warmup:
      type: 'linear'
      linear:
        warmup_steps: 1000  # learning rate rises from 0 to 0.1 over 1000 steps
