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
4ec2ee97
Commit
4ec2ee97
authored
May 19, 2020
by
Chen Chen
Committed by
A. Unique TensorFlower
May 19, 2020
Browse files
Internal change
PiperOrigin-RevId: 312313738
parent
1e72c1f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
official/nlp/bert/bert_models.py
official/nlp/bert/bert_models.py
+4
-1
No files found.
official/nlp/bert/bert_models.py
View file @
4ec2ee97
...
...
@@ -134,13 +134,16 @@ def get_transformer_encoder(bert_config,
intermediate_activation
=
tf_utils
.
get_activation
(
bert_config
.
hidden_act
),
dropout_rate
=
bert_config
.
hidden_dropout_prob
,
attention_dropout_rate
=
bert_config
.
attention_probs_dropout_prob
,
kernel_initializer
=
tf
.
keras
.
initializers
.
TruncatedNormal
(
stddev
=
bert_config
.
initializer_range
),
)
kwargs
=
dict
(
embedding_cfg
=
embedding_cfg
,
hidden_cfg
=
hidden_cfg
,
num_hidden_instances
=
bert_config
.
num_hidden_layers
,
pooled_output_dim
=
bert_config
.
hidden_size
,
)
pooler_layer_initializer
=
tf
.
keras
.
initializers
.
TruncatedNormal
(
stddev
=
bert_config
.
initializer_range
))
# Relies on gin configuration to define the Transformer encoder arguments.
return
transformer_encoder_cls
(
**
kwargs
)
...
...
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