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
835b730b
Commit
835b730b
authored
Jul 22, 2021
by
Xianzhi Du
Committed by
A. Unique TensorFlower
Jul 22, 2021
Browse files
Internal change
PiperOrigin-RevId: 386275876
parent
47db997c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
72 additions
and
11 deletions
+72
-11
official/vision/beta/MODEL_GARDEN.md
official/vision/beta/MODEL_GARDEN.md
+1
-0
official/vision/beta/configs/experiments/retinanet/coco_mobilenetv2_tpu.yaml
...a/configs/experiments/retinanet/coco_mobilenetv2_tpu.yaml
+62
-0
official/vision/beta/configs/experiments/retinanet/coco_spinenet49_mobile_tpu.yaml
...igs/experiments/retinanet/coco_spinenet49_mobile_tpu.yaml
+2
-2
official/vision/beta/configs/experiments/retinanet/coco_spinenet49s_mobile_tpu.yaml
...gs/experiments/retinanet/coco_spinenet49s_mobile_tpu.yaml
+2
-2
official/vision/beta/configs/experiments/retinanet/coco_spinenet49xs_mobile_tpu.yaml
...s/experiments/retinanet/coco_spinenet49xs_mobile_tpu.yaml
+2
-2
official/vision/beta/configs/retinanet.py
official/vision/beta/configs/retinanet.py
+2
-4
official/vision/beta/configs/retinanet_test.py
official/vision/beta/configs/retinanet_test.py
+1
-1
No files found.
official/vision/beta/MODEL_GARDEN.md
View file @
835b730b
...
...
@@ -75,6 +75,7 @@ ResNet-RS-350 | 320x320 | 164.3 | 84.2 | 96.9 | [config](https://github.c
backbone | resolution | epochs | FLOPs (B) | params (M) | box AP | download
------------ | :--------: | -----: | --------: | ---------: | -----: | -------:
MobileNetv2 | 256x256 | 600 | - | 2.27 | 23.5 |
[
config
](
https://github.com/tensorflow/models/blob/master/official/vision/beta/configs/experiments/retinanet/coco_mobilenetv2_tpu.yaml
)
|
Mobile SpineNet-49 | 384x384 | 600 | 1.0 | 2.32 | 28.1 |
[
config
](
https://github.com/tensorflow/models/blob/master/official/vision/beta/configs/experiments/retinanet/coco_spinenet49_mobile_tpu.yaml
)
|
...
...
official/vision/beta/configs/experiments/retinanet/coco_mobilenetv2_tpu.yaml
0 → 100644
View file @
835b730b
# --experiment_type=retinanet_mobile_coco
# COCO AP 23.5%
runtime
:
distribution_strategy
:
'
tpu'
mixed_precision_dtype
:
'
bfloat16'
task
:
losses
:
l2_weight_decay
:
3.0e-05
model
:
anchor
:
anchor_size
:
3
aspect_ratios
:
[
0.5
,
1.0
,
2.0
]
num_scales
:
3
backbone
:
mobilenet
:
model_id
:
'
MobileNetV2'
filter_size_scale
:
1.0
type
:
'
mobilenet'
decoder
:
type
:
'
fpn'
fpn
:
num_filters
:
128
use_separable_conv
:
true
head
:
num_convs
:
4
num_filters
:
128
use_separable_conv
:
true
input_size
:
[
256
,
256
,
3
]
max_level
:
7
min_level
:
3
norm_activation
:
activation
:
'
relu6'
norm_epsilon
:
0.001
norm_momentum
:
0.99
use_sync_bn
:
true
train_data
:
dtype
:
'
bfloat16'
global_batch_size
:
256
is_training
:
true
parser
:
aug_rand_hflip
:
true
aug_scale_max
:
2.0
aug_scale_min
:
0.5
validation_data
:
dtype
:
'
bfloat16'
global_batch_size
:
8
is_training
:
false
trainer
:
optimizer_config
:
learning_rate
:
stepwise
:
boundaries
:
[
263340
,
272580
]
values
:
[
0.32
,
0.032
,
0.0032
]
type
:
'
stepwise'
warmup
:
linear
:
warmup_learning_rate
:
0.0067
warmup_steps
:
2000
steps_per_loop
:
462
train_steps
:
277200
validation_interval
:
462
validation_steps
:
625
official/vision/beta/configs/experiments/retinanet/coco_spinenet49_mobile_tpu.yaml
View file @
835b730b
# --experiment_type=retinanet_
spinenet_
mobile_coco
# --experiment_type=retinanet_mobile_coco
runtime
:
distribution_strategy
:
'
tpu'
mixed_precision_dtype
:
'
bfloat16'
...
...
@@ -47,7 +47,7 @@ trainer:
optimizer_config
:
learning_rate
:
stepwise
:
boundaries
:
[
26
565
0
,
272580
]
boundaries
:
[
26
334
0
,
272580
]
values
:
[
0.32
,
0.032
,
0.0032
]
type
:
'
stepwise'
warmup
:
...
...
official/vision/beta/configs/experiments/retinanet/coco_spinenet49s_mobile_tpu.yaml
View file @
835b730b
# --experiment_type=retinanet_
spinenet_
mobile_coco
# --experiment_type=retinanet_mobile_coco
runtime
:
distribution_strategy
:
'
tpu'
mixed_precision_dtype
:
'
bfloat16'
...
...
@@ -47,7 +47,7 @@ trainer:
optimizer_config
:
learning_rate
:
stepwise
:
boundaries
:
[
26
565
0
,
272580
]
boundaries
:
[
26
334
0
,
272580
]
values
:
[
0.32
,
0.032
,
0.0032
]
type
:
'
stepwise'
warmup
:
...
...
official/vision/beta/configs/experiments/retinanet/coco_spinenet49xs_mobile_tpu.yaml
View file @
835b730b
# --experiment_type=retinanet_
spinenet_
mobile_coco
# --experiment_type=retinanet_mobile_coco
runtime
:
distribution_strategy
:
'
tpu'
mixed_precision_dtype
:
'
bfloat16'
...
...
@@ -47,7 +47,7 @@ trainer:
optimizer_config
:
learning_rate
:
stepwise
:
boundaries
:
[
26
565
0
,
272580
]
boundaries
:
[
26
334
0
,
272580
]
values
:
[
0.32
,
0.032
,
0.0032
]
type
:
'
stepwise'
warmup
:
...
...
official/vision/beta/configs/retinanet.py
View file @
835b730b
...
...
@@ -326,9 +326,9 @@ def retinanet_spinenet_coco() -> cfg.ExperimentConfig:
return
config
@
exp_factory
.
register_config_factory
(
'retinanet_
spinenet_
mobile_coco'
)
@
exp_factory
.
register_config_factory
(
'retinanet_mobile_coco'
)
def
retinanet_spinenet_mobile_coco
()
->
cfg
.
ExperimentConfig
:
"""COCO object detection with
RetinaNet using M
obile
Sp
in
e
Net
backbone
."""
"""COCO object detection with
m
obile
Ret
in
a
Net."""
train_batch_size
=
256
eval_batch_size
=
8
steps_per_epoch
=
COCO_TRAIN_EXAMPLES
//
train_batch_size
...
...
@@ -407,8 +407,6 @@ def retinanet_spinenet_mobile_coco() -> cfg.ExperimentConfig:
restrictions
=
[
'task.train_data.is_training != None'
,
'task.validation_data.is_training != None'
,
'task.model.min_level == task.model.backbone.spinenet_mobile.min_level'
,
'task.model.max_level == task.model.backbone.spinenet_mobile.max_level'
,
])
return
config
official/vision/beta/configs/retinanet_test.py
View file @
835b730b
...
...
@@ -28,7 +28,7 @@ class RetinaNetConfigTest(tf.test.TestCase, parameterized.TestCase):
@
parameterized
.
parameters
(
(
'retinanet_resnetfpn_coco'
,),
(
'retinanet_spinenet_coco'
,),
(
'retinanet_
spinenet_
mobile_coco'
,),
(
'retinanet_mobile_coco'
,),
)
def
test_retinanet_configs
(
self
,
config_name
):
config
=
exp_factory
.
get_exp_config
(
config_name
)
...
...
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