Commit 716b9d73 authored by Shixin Luo's avatar Shixin Luo
Browse files

modify default hyperparameters

parent 61961346
...@@ -13,7 +13,7 @@ task: ...@@ -13,7 +13,7 @@ task:
width_multiplier: 1.0 width_multiplier: 1.0
dropout_rate: 0.2 dropout_rate: 0.2
losses: losses:
l2_weight_decay: 0.0001 l2_weight_decay: 0.00002
one_hot: True one_hot: True
label_smoothing: 0.1 label_smoothing: 0.1
train_data: train_data:
...@@ -28,7 +28,7 @@ task: ...@@ -28,7 +28,7 @@ task:
dtype: 'float32' dtype: 'float32'
drop_remainder: False drop_remainder: False
trainer: trainer:
train_steps: 150120 # 90 * steps_per_epoch train_steps: 700000 # 700K
validation_steps: 65 validation_steps: 65
validation_interval: 1668 validation_interval: 1668
steps_per_loop: 1668 # NUM_EXAMPLES (1281167) // global_batch_size steps_per_loop: 1668 # NUM_EXAMPLES (1281167) // global_batch_size
...@@ -46,7 +46,7 @@ trainer: ...@@ -46,7 +46,7 @@ trainer:
exponential: exponential:
initial_learning_rate: 0.36 # 0.045 * NUM_GPUS initial_learning_rate: 0.36 # 0.045 * NUM_GPUS
decay_steps: 4170 # 2.5 * steps_per_epoch decay_steps: 4170 # 2.5 * steps_per_epoch
decay_rate: 0.97 decay_rate: 0.98
staircase: True staircase: True
warmup: warmup:
type: 'linear' type: 'linear'
......
...@@ -233,7 +233,7 @@ def image_classification_imagenet_mobilenet() -> cfg.ExperimentConfig: ...@@ -233,7 +233,7 @@ def image_classification_imagenet_mobilenet() -> cfg.ExperimentConfig:
model_id='MobileNetV2', width_multiplier=1.0)), model_id='MobileNetV2', width_multiplier=1.0)),
norm_activation=common.NormActivation( norm_activation=common.NormActivation(
norm_momentum=0.9997, norm_epsilon=1e-3)), norm_momentum=0.9997, norm_epsilon=1e-3)),
losses=Losses(l2_weight_decay=1e-4, label_smoothing=0.1), losses=Losses(l2_weight_decay=2e-5, label_smoothing=0.1),
train_data=DataConfig( train_data=DataConfig(
input_path=os.path.join(IMAGENET_INPUT_PATH_BASE, 'train*'), input_path=os.path.join(IMAGENET_INPUT_PATH_BASE, 'train*'),
is_training=True, is_training=True,
...@@ -264,8 +264,7 @@ def image_classification_imagenet_mobilenet() -> cfg.ExperimentConfig: ...@@ -264,8 +264,7 @@ def image_classification_imagenet_mobilenet() -> cfg.ExperimentConfig:
# 0.045 * NUM_GPUS # 0.045 * NUM_GPUS
'initial_learning_rate': 0.045 * (train_batch_size // 96), 'initial_learning_rate': 0.045 * (train_batch_size // 96),
# (2.5 / NUM_GPUS) epochs # (2.5 / NUM_GPUS) epochs
'decay_steps': int((2.5 / (train_batch_size // 96)) 'decay_steps': int(2.5 * steps_per_epoch),
* steps_per_epoch),
'decay_rate': 0.98, 'decay_rate': 0.98,
'staircase': True 'staircase': True
} }
......
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