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
2878da2e
Commit
2878da2e
authored
May 12, 2020
by
Chen Chen
Committed by
A. Unique TensorFlower
May 12, 2020
Browse files
Internal Change
PiperOrigin-RevId: 311072125
parent
adb61343
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
official/nlp/modeling/layers/transformer.py
official/nlp/modeling/layers/transformer.py
+3
-0
No files found.
official/nlp/modeling/layers/transformer.py
View file @
2878da2e
...
...
@@ -19,6 +19,7 @@ from __future__ import division
# from __future__ import google_type_annotations
from
__future__
import
print_function
import
gin
import
tensorflow
as
tf
from
official.nlp.modeling.layers
import
attention
...
...
@@ -219,6 +220,8 @@ class Transformer(tf.keras.layers.Layer):
return
layer_output
@
tf
.
keras
.
utils
.
register_keras_serializable
(
package
=
"Text"
)
@
gin
.
configurable
class
CompiledTransformer
(
Transformer
):
@
tf_function_if_eager
(
experimental_compile
=
True
)
...
...
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