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
39bdc9c2
Commit
39bdc9c2
authored
Jun 08, 2020
by
Chen Chen
Committed by
A. Unique TensorFlower
Jun 08, 2020
Browse files
Internal change
PiperOrigin-RevId: 315325330
parent
ec7265be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
official/nlp/configs/bert.py
official/nlp/configs/bert.py
+2
-2
No files found.
official/nlp/configs/bert.py
View file @
39bdc9c2
...
@@ -49,10 +49,10 @@ class BertPretrainerConfig(base_config.Config):
...
@@ -49,10 +49,10 @@ class BertPretrainerConfig(base_config.Config):
def
instantiate_from_cfg
(
def
instantiate_from_cfg
(
config
:
BertPretrainerConfig
,
config
:
BertPretrainerConfig
,
encoder_network
:
Optional
[
tf
.
keras
.
layers
.
Layer
]
=
None
):
encoder_network
:
Optional
[
tf
.
keras
.
Model
]
=
None
):
"""Instantiates a BertPretrainer from the config."""
"""Instantiates a BertPretrainer from the config."""
encoder_cfg
=
config
.
encoder
if
encoder_network
is
None
:
if
encoder_network
is
None
:
encoder_cfg
=
config
.
encoder
encoder_network
=
networks
.
TransformerEncoder
(
encoder_network
=
networks
.
TransformerEncoder
(
vocab_size
=
encoder_cfg
.
vocab_size
,
vocab_size
=
encoder_cfg
.
vocab_size
,
hidden_size
=
encoder_cfg
.
hidden_size
,
hidden_size
=
encoder_cfg
.
hidden_size
,
...
...
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