Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
9070109e
Commit
9070109e
authored
Sep 28, 2020
by
Shixin Luo
Browse files
change the default number of gpu and tpu for the experiment config template
parent
bf4c3894
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
16 deletions
+19
-16
official/vision/beta/configs/experiments/image_classification/imagenet_mobilenetv2_1.0_gpu.yaml
...ts/image_classification/imagenet_mobilenetv2_1.0_gpu.yaml
+11
-11
official/vision/beta/configs/image_classification.py
official/vision/beta/configs/image_classification.py
+8
-5
No files found.
official/vision/beta/configs/experiments/image_classification/imagenet_mobilenetv2_1.0_gpu.yaml
View file @
9070109e
...
...
@@ -19,21 +19,21 @@ task:
train_data
:
input_path
:
'
imagenet-2012-tfrecord/train*'
is_training
:
True
global_batch_size
:
96
global_batch_size
:
768
# 96 * 8
dtype
:
'
float32'
validation_data
:
input_path
:
'
imagenet-2012-tfrecord/valid*'
is_training
:
False
global_batch_size
:
96
global_batch_size
:
768
# 96 * 8
dtype
:
'
float32'
drop_remainder
:
False
trainer
:
train_steps
:
1
2
01
050
# 90 * steps_per_epoch
validation_steps
:
5
20
validation_interval
:
1
3345
steps_per_loop
:
1
3345
# NUM_EXAMPLES (1281167) // global_batch_size
summary_interval
:
1
3345
checkpoint_interval
:
1
3345
train_steps
:
1
5
01
20
# 90 * steps_per_epoch
validation_steps
:
6
5
validation_interval
:
1
668
steps_per_loop
:
1
668
# NUM_EXAMPLES (1281167) // global_batch_size
summary_interval
:
1
668
checkpoint_interval
:
1
668
optimizer_config
:
optimizer
:
type
:
'
rmsprop'
...
...
@@ -44,13 +44,13 @@ trainer:
learning_rate
:
type
:
'
exponential'
exponential
:
initial_learning_rate
:
0.
045,
decay_steps
:
33362,
# 2.5 * steps_per_epoch
initial_learning_rate
:
0.
36,
# 0.045 * NUM_GPUS
decay_steps
:
4170,
# 2.5 * steps_per_epoch
decay_rate
:
0.97,
staircase
:
True
warmup
:
type
:
'
linear'
linear
:
warmup_steps
:
66725
# 5 * steps_per_epoch
warmup_steps
:
8340
# 5 * steps_per_epoch
ema
:
average_decay
:
0.9999
\ No newline at end of file
official/vision/beta/configs/image_classification.py
View file @
9070109e
...
...
@@ -218,8 +218,8 @@ def image_classification_imagenet_revnet() -> cfg.ExperimentConfig:
@
exp_factory
.
register_config_factory
(
'mobilenet_imagenet'
)
def
image_classification_imagenet_mobilenet
()
->
cfg
.
ExperimentConfig
:
"""Image classification on imagenet with mobilenet."""
train_batch_size
=
1
92
eval_batch_size
=
1
92
train_batch_size
=
1
536
# 96 * 16
eval_batch_size
=
1
536
# 96 * 16
steps_per_epoch
=
IMAGENET_TRAIN_EXAMPLES
//
train_batch_size
config
=
cfg
.
ExperimentConfig
(
task
=
ImageClassificationTask
(
...
...
@@ -261,9 +261,12 @@ def image_classification_imagenet_mobilenet() -> cfg.ExperimentConfig:
'learning_rate'
:
{
'type'
:
'exponential'
,
'exponential'
:
{
'initial_learning_rate'
:
0.045
,
'decay_steps'
:
int
(
2.4
*
steps_per_epoch
),
'decay_rate'
:
0.97
,
# 0.045 * NUM_GPUS
'initial_learning_rate'
:
0.045
*
(
train_batch_size
//
96
),
# (2.5 / NUM_GPUS) epochs
'decay_steps'
:
int
((
2.5
/
(
train_batch_size
//
96
))
*
steps_per_epoch
),
'decay_rate'
:
0.98
,
'staircase'
:
True
}
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment