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
dbbed31d
Commit
dbbed31d
authored
Sep 08, 2020
by
Zhenyu Tan
Committed by
A. Unique TensorFlower
Sep 08, 2020
Browse files
BertEncoder to ingest TransformerEncoderBlock
PiperOrigin-RevId: 330622339
parent
aeb2cab1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
official/nlp/modeling/networks/bert_encoder.py
official/nlp/modeling/networks/bert_encoder.py
+5
-5
No files found.
official/nlp/modeling/networks/bert_encoder.py
View file @
dbbed31d
...
...
@@ -175,12 +175,12 @@ class BertEncoder(tf.keras.Model):
transformer_output_range
=
output_range
else
:
transformer_output_range
=
None
layer
=
layers
.
Transformer
(
layer
=
keras_nlp
.
layers
.
Transformer
EncoderBlock
(
num_attention_heads
=
num_attention_heads
,
in
t
er
mediate_size
=
intermediate_size
,
in
t
er
mediate
_activation
=
activation
,
dropout
_rate
=
dropout_rate
,
attention_dropout
_rate
=
attention_dropout_rate
,
in
n
er
_dim
=
intermediate_size
,
in
n
er_activation
=
activation
,
output_
dropout
=
dropout_rate
,
attention_dropout
=
attention_dropout_rate
,
output_range
=
transformer_output_range
,
kernel_initializer
=
initializer
,
name
=
'transformer/layer_%d'
%
i
)
...
...
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