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
6c54d37d
"sgl-kernel/python/vscode:/vscode.git/clone" did not exist on "f226d3da2ae0101cb92764fe2f31f518fe41bb70"
Commit
6c54d37d
authored
Oct 19, 2021
by
Jialu Liu
Committed by
A. Unique TensorFlower
Oct 19, 2021
Browse files
Internal change
PiperOrigin-RevId: 404247019
parent
5ed72458
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
official/nlp/projects/teams/teams.py
official/nlp/projects/teams/teams.py
+4
-4
No files found.
official/nlp/projects/teams/teams.py
View file @
6c54d37d
...
@@ -51,9 +51,7 @@ class TeamsPretrainerConfig(base_config.Config):
...
@@ -51,9 +51,7 @@ class TeamsPretrainerConfig(base_config.Config):
@
gin
.
configurable
@
gin
.
configurable
def
get_encoder
(
bert_config
,
def
get_encoder
(
bert_config
,
embedding_network
=
None
,
hidden_layers
=
None
):
embedding_network
=
None
,
hidden_layers
=
layers
.
Transformer
):
"""Gets a 'EncoderScaffold' object.
"""Gets a 'EncoderScaffold' object.
Args:
Args:
...
@@ -85,7 +83,9 @@ def get_encoder(bert_config,
...
@@ -85,7 +83,9 @@ def get_encoder(bert_config,
stddev
=
bert_config
.
initializer_range
),
stddev
=
bert_config
.
initializer_range
),
)
)
if
embedding_network
is
None
:
if
embedding_network
is
None
:
embedding_network
=
networks
.
PackedSequenceEmbedding
(
**
embedding_cfg
)
embedding_network
=
networks
.
PackedSequenceEmbedding
if
hidden_layers
is
None
:
hidden_layers
=
layers
.
Transformer
kwargs
=
dict
(
kwargs
=
dict
(
embedding_cfg
=
embedding_cfg
,
embedding_cfg
=
embedding_cfg
,
embedding_cls
=
embedding_network
,
embedding_cls
=
embedding_network
,
...
...
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