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
5cf005fd
"git@developer.sourcefind.cn:hehl2/torchaudio.git" did not exist on "e3b40d1cf4396f010f68eca3079b48352a592db3"
Commit
5cf005fd
authored
Apr 04, 2020
by
Hongkun Yu
Committed by
A. Unique TensorFlower
Apr 04, 2020
Browse files
Internal change
PiperOrigin-RevId: 304805298
parent
6f574922
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
official/benchmark/keras_imagenet_benchmark.py
official/benchmark/keras_imagenet_benchmark.py
+8
-4
official/vision/image_classification/classifier_trainer_test.py
...al/vision/image_classification/classifier_trainer_test.py
+1
-2
official/vision/image_classification/configs/base_configs.py
official/vision/image_classification/configs/base_configs.py
+0
-2
No files found.
official/benchmark/keras_imagenet_benchmark.py
View file @
5cf005fd
...
@@ -180,7 +180,8 @@ class Resnet50KerasAccuracy(keras_benchmark.KerasBenchmark):
...
@@ -180,7 +180,8 @@ class Resnet50KerasAccuracy(keras_benchmark.KerasBenchmark):
def
benchmark_8_gpu
(
self
):
def
benchmark_8_gpu
(
self
):
"""Tests Keras model with eager, dist_strat and 8 GPUs."""
"""Tests Keras model with eager, dist_strat and 8 GPUs."""
self
.
_run_benchmark
(
self
.
_setup
()
self
.
_run_and_report_benchmark
(
experiment_name
=
'benchmark_8_gpu'
,
experiment_name
=
'benchmark_8_gpu'
,
num_gpus
=
8
,
num_gpus
=
8
,
per_replica_batch_size
=
128
,
per_replica_batch_size
=
128
,
...
@@ -191,7 +192,8 @@ class Resnet50KerasAccuracy(keras_benchmark.KerasBenchmark):
...
@@ -191,7 +192,8 @@ class Resnet50KerasAccuracy(keras_benchmark.KerasBenchmark):
def
benchmark_8_gpu_fp16
(
self
):
def
benchmark_8_gpu_fp16
(
self
):
"""Tests Keras model with eager, dist_strat, 8 GPUs, and fp16."""
"""Tests Keras model with eager, dist_strat, 8 GPUs, and fp16."""
self
.
_run_benchmark
(
self
.
_setup
()
self
.
_run_and_report_benchmark
(
experiment_name
=
'benchmark_8_gpu_fp16'
,
experiment_name
=
'benchmark_8_gpu_fp16'
,
num_gpus
=
8
,
num_gpus
=
8
,
per_replica_batch_size
=
256
,
per_replica_batch_size
=
256
,
...
@@ -202,7 +204,8 @@ class Resnet50KerasAccuracy(keras_benchmark.KerasBenchmark):
...
@@ -202,7 +204,8 @@ class Resnet50KerasAccuracy(keras_benchmark.KerasBenchmark):
def
benchmark_xla_8_gpu_fp16
(
self
):
def
benchmark_xla_8_gpu_fp16
(
self
):
"""Tests Keras model with XLA, eager, dist_strat, 8 GPUs and fp16."""
"""Tests Keras model with XLA, eager, dist_strat, 8 GPUs and fp16."""
self
.
_run_benchmark
(
self
.
_setup
()
self
.
_run_and_report_benchmark
(
experiment_name
=
'benchmark_xla_8_gpu_fp16'
,
experiment_name
=
'benchmark_xla_8_gpu_fp16'
,
num_gpus
=
8
,
num_gpus
=
8
,
per_replica_batch_size
=
256
,
per_replica_batch_size
=
256
,
...
@@ -214,7 +217,8 @@ class Resnet50KerasAccuracy(keras_benchmark.KerasBenchmark):
...
@@ -214,7 +217,8 @@ class Resnet50KerasAccuracy(keras_benchmark.KerasBenchmark):
def
benchmark_xla_8_gpu_fp16_dynamic
(
self
):
def
benchmark_xla_8_gpu_fp16_dynamic
(
self
):
"""Tests Keras model with XLA, eager, dist_strat, 8 GPUs, dynamic fp16."""
"""Tests Keras model with XLA, eager, dist_strat, 8 GPUs, dynamic fp16."""
self
.
_run_benchmark
(
self
.
_setup
()
self
.
_run_and_report_benchmark
(
experiment_name
=
'benchmark_xla_8_gpu_fp16_dynamic'
,
experiment_name
=
'benchmark_xla_8_gpu_fp16_dynamic'
,
top_1_min
=
0.736
,
top_1_min
=
0.736
,
num_gpus
=
8
,
num_gpus
=
8
,
...
...
official/vision/image_classification/classifier_trainer_test.py
View file @
5cf005fd
...
@@ -340,8 +340,7 @@ class UtilTests(parameterized.TestCase, tf.test.TestCase):
...
@@ -340,8 +340,7 @@ class UtilTests(parameterized.TestCase, tf.test.TestCase):
dataset_num_private_threads
=
1
,
dataset_num_private_threads
=
1
,
),
),
train_dataset
=
dataset_factory
.
DatasetConfig
(
dtype
=
dtype
),
train_dataset
=
dataset_factory
.
DatasetConfig
(
dtype
=
dtype
),
model
=
base_configs
.
ModelConfig
(
model
=
base_configs
.
ModelConfig
(),
loss
=
base_configs
.
LossConfig
(
loss_scale
=
'dynamic'
)),
)
)
class
EmptyClass
:
class
EmptyClass
:
...
...
official/vision/image_classification/configs/base_configs.py
View file @
5cf005fd
...
@@ -117,13 +117,11 @@ class LossConfig(base_config.Config):
...
@@ -117,13 +117,11 @@ class LossConfig(base_config.Config):
Attributes:
Attributes:
name: The name of the loss. Defaults to None.
name: The name of the loss. Defaults to None.
loss_scale: The type of loss scale
label_smoothing: Whether or not to apply label smoothing to the loss. This
label_smoothing: Whether or not to apply label smoothing to the loss. This
only applies to 'categorical_cross_entropy'.
only applies to 'categorical_cross_entropy'.
"""
"""
name
:
str
=
None
name
:
str
=
None
loss_scale
:
str
=
None
label_smoothing
:
float
=
None
label_smoothing
:
float
=
None
...
...
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