"...resnet50_tensorflow.git" did not exist on "e73a2d0293ce4f40437d18f03f8186d682d4822f"
Commit d68c7b96 authored by Shixin Luo's avatar Shixin Luo
Browse files

add default config for mobilenet v2 that replicate the expected performance

parent 7a9c72ad
# MobileNetV2_1.0 ImageNet classification. 71.0% top-1 and 90.0% top-5 accuracy.
runtime:
distribution_strategy: 'mirrored'
mixed_precision_dtype: 'float32'
mixed_precision_dtype: 'float16'
loss_scale: 'dynamic'
task:
model:
......@@ -20,15 +21,15 @@ task:
input_path: 'imagenet-2012-tfrecord/train*'
is_training: True
global_batch_size: 768 # 96 * 8
dtype: 'float32'
dtype: 'float16'
validation_data:
input_path: 'imagenet-2012-tfrecord/valid*'
is_training: False
global_batch_size: 768 # 96 * 8
dtype: 'float32'
dtype: 'float16'
drop_remainder: False
trainer:
train_steps: 700000 # 700K
train_steps: 300000
validation_steps: 65
validation_interval: 1668
steps_per_loop: 1668 # NUM_EXAMPLES (1281167) // global_batch_size
......@@ -36,19 +37,17 @@ trainer:
checkpoint_interval: 1668
optimizer_config:
optimizer:
type: 'rmsprop'
rmsprop:
decay: 0.9
type: 'sgd'
sgd:
momentum: 0.9
epsilon: 0.002
learning_rate:
type: 'exponential'
exponential:
initial_learning_rate: 0.36 # 0.045 * NUM_GPUS
initial_learning_rate: 0.8 # 0.1 * NUM_GPUS
decay_steps: 4170 # 2.5 * steps_per_epoch
decay_rate: 0.98
decay_rate: 0.95
staircase: True
warmup:
type: 'linear'
linear:
warmup_steps: 8340 # 5 * steps_per_epoch
\ No newline at end of file
warmup_steps: 100
\ No newline at end of file
# MobileNetV2_1.0 ImageNet classification. 72.26% top-1 and 90.76% top-5 accuracy.
runtime:
distribution_strategy: 'tpu'
mixed_precision_dtype: 'bfloat16'
task:
model:
num_classes: 1001
input_size: [224, 224, 3]
backbone:
type: 'mobilenet'
mobilenet:
model_id: 'MobileNetV2'
width_multiplier: 1.0
dropout_rate: 0.2
losses:
l2_weight_decay: 0.00002
one_hot: True
label_smoothing: 0.1
train_data:
input_path: 'gs://tf_mobilenet/imagenet/imagenet-2012-tfrecord/train*'
is_training: True
global_batch_size: 2048 # 64 * 32
dtype: 'bfloat16'
validation_data:
input_path: 'gs://tf_mobilenet/imagenet/imagenet-2012-tfrecord/valid*'
is_training: False
global_batch_size: 2048 # 64 * 32
dtype: 'bfloat16'
drop_remainder: False
trainer:
train_steps: 300000
validation_steps: 24
validation_interval: 625
steps_per_loop: 625 # NUM_EXAMPLES (1281167) // global_batch_size
summary_interval: 625
checkpoint_interval: 625
optimizer_config:
optimizer:
type: 'sgd'
sgd:
momentum: 0.9
learning_rate:
type: 'exponential'
exponential:
initial_learning_rate: 3.2 # 0.1 * 32
decay_steps: 1562 # 2.5 * steps_per_epoch
decay_rate: 0.96
staircase: True
warmup:
type: 'linear'
linear:
warmup_steps: 50
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment