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
9e0cd251
Commit
9e0cd251
authored
Nov 17, 2020
by
Reed Wanderman-Milne
Committed by
A. Unique TensorFlower
Nov 17, 2020
Browse files
Internal change
PiperOrigin-RevId: 342937744
parent
1d84aa30
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
official/nlp/transformer/transformer_main.py
official/nlp/transformer/transformer_main.py
+4
-4
No files found.
official/nlp/transformer/transformer_main.py
View file @
9e0cd251
...
@@ -175,9 +175,8 @@ class TransformerTask(object):
...
@@ -175,9 +175,8 @@ class TransformerTask(object):
else
:
else
:
logging
.
info
(
"Not using any distribution strategy."
)
logging
.
info
(
"Not using any distribution strategy."
)
performance
.
set_mixed_precision_policy
(
performance
.
set_mixed_precision_policy
(
params
[
"dtype"
],
params
[
"dtype"
],
use_experimental_api
=
False
)
flags_core
.
get_loss_scale
(
flags_obj
,
default_for_fp16
=
"dynamic"
))
@
property
@
property
def
use_tpu
(
self
):
def
use_tpu
(
self
):
...
@@ -443,7 +442,8 @@ class TransformerTask(object):
...
@@ -443,7 +442,8 @@ class TransformerTask(object):
use_float16
=
params
[
"dtype"
]
==
tf
.
float16
,
use_float16
=
params
[
"dtype"
]
==
tf
.
float16
,
use_graph_rewrite
=
self
.
flags_obj
.
fp16_implementation
==
"graph_rewrite"
,
use_graph_rewrite
=
self
.
flags_obj
.
fp16_implementation
==
"graph_rewrite"
,
loss_scale
=
flags_core
.
get_loss_scale
(
loss_scale
=
flags_core
.
get_loss_scale
(
self
.
flags_obj
,
default_for_fp16
=
"dynamic"
))
self
.
flags_obj
,
default_for_fp16
=
"dynamic"
),
use_experimental_api
=
False
)
return
opt
return
opt
...
...
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