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
02e5acf8
Commit
02e5acf8
authored
Oct 02, 2020
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 335115606
parent
5565c73a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
186 additions
and
18 deletions
+186
-18
official/vision/beta/MODEL_GARDEN.md
official/vision/beta/MODEL_GARDEN.md
+22
-9
official/vision/beta/configs/experiments/image_classification/imagenet_resnet101_tpu.yaml
...eriments/image_classification/imagenet_resnet101_tpu.yaml
+50
-0
official/vision/beta/configs/experiments/image_classification/imagenet_resnet152_tpu.yaml
...eriments/image_classification/imagenet_resnet152_tpu.yaml
+50
-0
official/vision/beta/configs/experiments/image_classification/imagenet_resnet200_tpu.yaml
...eriments/image_classification/imagenet_resnet200_tpu.yaml
+50
-0
official/vision/beta/configs/experiments/image_classification/imagenet_resnet50_tpu.yaml
...periments/image_classification/imagenet_resnet50_tpu.yaml
+12
-9
official/vision/beta/configs/image_classification.py
official/vision/beta/configs/image_classification.py
+2
-0
No files found.
official/vision/beta/MODEL_GARDEN.md
View file @
02e5acf8
...
...
@@ -5,16 +5,29 @@ TF Vision model garden provides a large collection of baselines and checkpoints
## Image Classification
### Common Settings and Notes
*
We provide ImageNet checkpoints for
[
ResNet
](
https://arxiv.org/abs/1512.03385
)
models.
*
Training details:
*
All models are trained from scratch for 90 epochs with batch size 4096 and 1.6 initial stepwise decay learning rate.
*
Unless noted, all models are trained with l2 weight regularization and ReLU activation.
### ImageNet Baselines
| model | resolution | epochs | FLOPs (B) | params (M) | Top-1 | Top-5 | download |
| ------------ |:-------------:| ---------:|-----------:|--------:|--------:|---------:|---------:|
| ResNet-50 | 224x224 | 90 | 4.1 | 25.6 | 76.1 | 92.9 | config |
#### Models trained with vanilla settings:
*
Models are trained from scratch with batch size 4096 and 1.6 initial learning rate.
*
Linear warmup is applied for the first 5 epochs.
*
Models trained with l2 weight regularization and ReLU activation.
| model | resolution | epochs | Top-1 | Top-5 | download |
| ------------ |:-------------:|--------:|--------:|---------:|---------:|
| ResNet-50 | 224x224 | 90 | 76.1 | 92.9 | config |
| ResNet-50 | 224x224 | 200 | 77.1 | 93.5 | config |
| ResNet-101 | 224x224 | 200 | 78.3 | 94.2 | config |
| ResNet-152 | 224x224 | 200 | 78.7 | 94.3 | config |
#### Models trained with training features including:
*
Label smoothing 0.1.
*
Swish activation.
| model | resolution | epochs | Top-1 | Top-5 | download |
| ------------ |:-------------:| ---------:|--------:|---------:|---------:|
| ResNet-50 | 224x224 | 200 | 78.1 | 93.9 |
[
config
](
https://github.com/tensorflow/models/blob/master/official/vision/beta/configs/experiments/image_classification/imagenet_resnet50_tpu.yaml
)
|
| ResNet-101 | 224x224 | 200 | 79.1 | 94.5 |
[
config
](
https://github.com/tensorflow/models/blob/master/official/vision/beta/configs/experiments/image_classification/imagenet_resnet101_tpu.yaml
)
|
| ResNet-152 | 224x224 | 200 | 79.4 | 94.7 |
[
config
](
https://github.com/tensorflow/models/blob/master/official/vision/beta/configs/experiments/image_classification/imagenet_resnet152_tpu.yaml
)
|
| ResNet-200 | 224x224 | 200 | 79.9 | 94.8 |
[
config
](
https://github.com/tensorflow/models/blob/master/official/vision/beta/configs/experiments/image_classification/imagenet_resnet200_tpu.yaml
)
|
...
...
official/vision/beta/configs/experiments/image_classification/imagenet_resnet101_tpu.yaml
0 → 100644
View file @
02e5acf8
# ResNet-101 ImageNet classification. 79.1% top-1 and 94.5% top-5 accuracy.
runtime
:
distribution_strategy
:
'
tpu'
mixed_precision_dtype
:
'
bfloat16'
task
:
model
:
num_classes
:
1001
input_size
:
[
224
,
224
,
3
]
backbone
:
type
:
'
resnet'
resnet
:
model_id
:
101
norm_activation
:
activation
:
'
swish'
losses
:
l2_weight_decay
:
0.0001
one_hot
:
true
label_smoothing
:
0.1
train_data
:
input_path
:
'
imagenet-2012-tfrecord/train*'
is_training
:
true
global_batch_size
:
4096
dtype
:
'
bfloat16'
validation_data
:
input_path
:
'
imagenet-2012-tfrecord/valid*'
is_training
:
false
global_batch_size
:
4096
dtype
:
'
bfloat16'
drop_remainder
:
false
trainer
:
train_steps
:
62400
validation_steps
:
13
validation_interval
:
312
steps_per_loop
:
312
summary_interval
:
312
checkpoint_interval
:
312
optimizer_config
:
optimizer
:
type
:
'
sgd'
sgd
:
momentum
:
0.9
learning_rate
:
type
:
'
cosine'
cosine
:
initial_learning_rate
:
1.6
decay_steps
:
62400
warmup
:
type
:
'
linear'
linear
:
warmup_steps
:
1560
official/vision/beta/configs/experiments/image_classification/imagenet_resnet152_tpu.yaml
0 → 100644
View file @
02e5acf8
# ResNet-152 ImageNet classification. 79.4% top-1 and 94.7% top-5 accuracy.
runtime
:
distribution_strategy
:
'
tpu'
mixed_precision_dtype
:
'
bfloat16'
task
:
model
:
num_classes
:
1001
input_size
:
[
224
,
224
,
3
]
backbone
:
type
:
'
resnet'
resnet
:
model_id
:
152
norm_activation
:
activation
:
'
swish'
losses
:
l2_weight_decay
:
0.0001
one_hot
:
true
label_smoothing
:
0.1
train_data
:
input_path
:
'
imagenet-2012-tfrecord/train*'
is_training
:
true
global_batch_size
:
4096
dtype
:
'
bfloat16'
validation_data
:
input_path
:
'
imagenet-2012-tfrecord/valid*'
is_training
:
false
global_batch_size
:
4096
dtype
:
'
bfloat16'
drop_remainder
:
false
trainer
:
train_steps
:
62400
validation_steps
:
13
validation_interval
:
312
steps_per_loop
:
312
summary_interval
:
312
checkpoint_interval
:
312
optimizer_config
:
optimizer
:
type
:
'
sgd'
sgd
:
momentum
:
0.9
learning_rate
:
type
:
'
cosine'
cosine
:
initial_learning_rate
:
1.6
decay_steps
:
62400
warmup
:
type
:
'
linear'
linear
:
warmup_steps
:
1560
official/vision/beta/configs/experiments/image_classification/imagenet_resnet200_tpu.yaml
0 → 100644
View file @
02e5acf8
# ResNet-200 ImageNet classification. 79.9% top-1 and 94.8% top-5 accuracy.
runtime
:
distribution_strategy
:
'
tpu'
mixed_precision_dtype
:
'
bfloat16'
task
:
model
:
num_classes
:
1001
input_size
:
[
224
,
224
,
3
]
backbone
:
type
:
'
resnet'
resnet
:
model_id
:
200
norm_activation
:
activation
:
'
swish'
losses
:
l2_weight_decay
:
0.0001
one_hot
:
true
label_smoothing
:
0.1
train_data
:
input_path
:
'
imagenet-2012-tfrecord/train*'
is_training
:
true
global_batch_size
:
4096
dtype
:
'
bfloat16'
validation_data
:
input_path
:
'
imagenet-2012-tfrecord/valid*'
is_training
:
false
global_batch_size
:
4096
dtype
:
'
bfloat16'
drop_remainder
:
false
trainer
:
train_steps
:
62400
validation_steps
:
13
validation_interval
:
312
steps_per_loop
:
312
summary_interval
:
312
checkpoint_interval
:
312
optimizer_config
:
optimizer
:
type
:
'
sgd'
sgd
:
momentum
:
0.9
learning_rate
:
type
:
'
cosine'
cosine
:
initial_learning_rate
:
1.6
decay_steps
:
62400
warmup
:
type
:
'
linear'
linear
:
warmup_steps
:
1560
official/vision/beta/configs/experiments/image_classification/imagenet_resnet50_tpu.yaml
View file @
02e5acf8
# ResNet-50 ImageNet classification. 78.1% top-1 and 93.9% top-5 accuracy.
runtime
:
distribution_strategy
:
'
tpu'
mixed_precision_dtype
:
'
bfloat16'
...
...
@@ -9,23 +10,25 @@ task:
type
:
'
resnet'
resnet
:
model_id
:
50
norm_activation
:
activation
:
'
swish'
losses
:
l2_weight_decay
:
0.0001
one_hot
:
T
rue
one_hot
:
t
rue
label_smoothing
:
0.1
train_data
:
input_path
:
'
imagenet-2012-tfrecord/train*'
is_training
:
T
rue
is_training
:
t
rue
global_batch_size
:
4096
dtype
:
'
bfloat16'
validation_data
:
input_path
:
'
imagenet-2012-tfrecord/valid*'
is_training
:
F
alse
is_training
:
f
alse
global_batch_size
:
4096
dtype
:
'
bfloat16'
drop_remainder
:
F
alse
drop_remainder
:
f
alse
trainer
:
train_steps
:
2808
0
train_steps
:
6240
0
validation_steps
:
13
validation_interval
:
312
steps_per_loop
:
312
...
...
@@ -37,10 +40,10 @@ trainer:
sgd
:
momentum
:
0.9
learning_rate
:
type
:
'
stepwis
e'
stepwis
e
:
boundaries
:
[
9360
,
18720
,
24960
]
values
:
[
1.6
,
0.16
,
0.016
,
0.0016
]
type
:
'
cosin
e'
cosin
e
:
initial_learning_rate
:
1.6
decay_steps
:
62400
warmup
:
type
:
'
linear'
linear
:
...
...
official/vision/beta/configs/image_classification.py
View file @
02e5acf8
...
...
@@ -93,6 +93,8 @@ def image_classification_imagenet() -> cfg.ExperimentConfig:
model
=
ImageClassificationModel
(
num_classes
=
1001
,
input_size
=
[
224
,
224
,
3
],
backbone
=
backbones
.
Backbone
(
type
=
'resnet'
,
resnet
=
backbones
.
ResNet
(
model_id
=
50
)),
norm_activation
=
common
.
NormActivation
(
norm_momentum
=
0.9
,
norm_epsilon
=
1e-5
)),
losses
=
Losses
(
l2_weight_decay
=
1e-4
),
...
...
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