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
3097fd2a
Commit
3097fd2a
authored
May 06, 2020
by
Zongwei Zhou
Committed by
A. Unique TensorFlower
May 06, 2020
Browse files
Enable setting GPU private thread in Resnet CTL model
PiperOrigin-RevId: 310236258
parent
34dd50a3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py
...n/image_classification/resnet/resnet_ctl_imagenet_main.py
+8
-2
No files found.
official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py
View file @
3097fd2a
...
...
@@ -113,7 +113,13 @@ def run(flags_obj):
enable_xla
=
flags_obj
.
enable_xla
)
performance
.
set_mixed_precision_policy
(
flags_core
.
get_tf_dtype
(
flags_obj
))
# This only affects GPU.
if
tf
.
config
.
list_physical_devices
(
'GPU'
):
if
flags_obj
.
tf_gpu_thread_mode
:
keras_utils
.
set_gpu_thread_mode_and_count
(
per_gpu_thread_count
=
flags_obj
.
per_gpu_thread_count
,
gpu_thread_mode
=
flags_obj
.
tf_gpu_thread_mode
,
num_gpus
=
flags_obj
.
num_gpus
,
datasets_num_private_threads
=
flags_obj
.
datasets_num_private_threads
)
common
.
set_cudnn_batchnorm_mode
()
# TODO(anj-s): Set data_format without using Keras.
...
...
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