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
0886b384
Commit
0886b384
authored
Apr 27, 2020
by
Lucy Fox
Committed by
A. Unique TensorFlower
Apr 27, 2020
Browse files
Test Transformer training and evaluation with MLIR TF to XLA bridge enabled.
PiperOrigin-RevId: 308666667
parent
5ab76b51
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
official/nlp/transformer/misc.py
official/nlp/transformer/misc.py
+4
-0
official/nlp/transformer/transformer_main.py
official/nlp/transformer/transformer_main.py
+2
-0
No files found.
official/nlp/transformer/misc.py
View file @
0886b384
...
...
@@ -109,6 +109,10 @@ def define_transformer_flags():
flags
.
DEFINE_boolean
(
name
=
'enable_metrics_in_training'
,
default
=
False
,
help
=
'Whether to enable metrics during training.'
)
flags
.
DEFINE_boolean
(
name
=
'enable_mlir_bridge'
,
default
=
False
,
help
=
'Whether to enable the TF to XLA bridge.'
)
flags
.
DEFINE_string
(
name
=
'profile_steps'
,
default
=
None
,
help
=
'Save profiling data to model dir at given range of steps. The '
...
...
official/nlp/transformer/transformer_main.py
View file @
0886b384
...
...
@@ -470,6 +470,8 @@ def _ensure_dir(log_dir):
def
main
(
_
):
flags_obj
=
flags
.
FLAGS
if
flags_obj
.
enable_mlir_bridge
:
tf
.
config
.
experimental
.
enable_mlir_bridge
()
task
=
TransformerTask
(
flags_obj
)
# Execute flag override logic for better model performance
...
...
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