Commit 602f22ed authored by Shixin Luo's avatar Shixin Luo
Browse files

remove ema for optimizer since it throw errors

parent 9070109e
...@@ -38,19 +38,17 @@ trainer: ...@@ -38,19 +38,17 @@ trainer:
optimizer: optimizer:
type: 'rmsprop' type: 'rmsprop'
rmsprop: rmsprop:
decay: 0.9, decay: 0.9
momentum: 0.9, momentum: 0.9
epsilon: 0.002, epsilon: 0.002
learning_rate: learning_rate:
type: 'exponential' type: 'exponential'
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.97
staircase: True staircase: True
warmup: warmup:
type: 'linear' type: 'linear'
linear: linear:
warmup_steps: 8340 # 5 * steps_per_epoch warmup_steps: 8340 # 5 * steps_per_epoch
\ No newline at end of file
ema:
average_decay: 0.9999
\ No newline at end of file
...@@ -277,9 +277,6 @@ def image_classification_imagenet_mobilenet() -> cfg.ExperimentConfig: ...@@ -277,9 +277,6 @@ def image_classification_imagenet_mobilenet() -> cfg.ExperimentConfig:
'warmup_learning_rate': 0 'warmup_learning_rate': 0
} }
}, },
'ema': {
'average_decay': 0.9999
}
})), })),
restrictions=[ restrictions=[
'task.train_data.is_training != None', 'task.train_data.is_training != None',
......
...@@ -490,9 +490,7 @@ class InvertedBottleneckBlock(tf.keras.layers.Layer): ...@@ -490,9 +490,7 @@ class InvertedBottleneckBlock(tf.keras.layers.Layer):
# First 1x1 conv for channel expansion. # First 1x1 conv for channel expansion.
expand_filters = nn_layers.make_divisible( expand_filters = nn_layers.make_divisible(
self._in_filters * self._expand_ratio, self._divisible_by) self._in_filters * self._expand_ratio, self._divisible_by)
logging.info('expand_filter: {}, divisible_version {}'.format(
self._in_filters * self._expand_ratio, expand_filters
))
expand_kernel = 1 if self._use_depthwise else self._kernel_size expand_kernel = 1 if self._use_depthwise else self._kernel_size
expand_stride = 1 if self._use_depthwise else self._strides expand_stride = 1 if self._use_depthwise else self._strides
......
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