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
5ccb0e05
Commit
5ccb0e05
authored
Nov 24, 2020
by
Hongkun Yu
Committed by
A. Unique TensorFlower
Nov 24, 2020
Browse files
Update comments and users should use BertPretrainerV2 in the future.
PiperOrigin-RevId: 344194437
parent
81b707a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
official/nlp/modeling/models/bert_pretrainer.py
official/nlp/modeling/models/bert_pretrainer.py
+2
-5
No files found.
official/nlp/modeling/models/bert_pretrainer.py
View file @
5ccb0e05
...
...
@@ -28,11 +28,9 @@ from official.nlp.modeling import networks
@
tf
.
keras
.
utils
.
register_keras_serializable
(
package
=
'Text'
)
class
BertPretrainer
(
tf
.
keras
.
Model
):
"""BERT
network
training model.
"""BERT
pre
training model.
This is an implementation of the network structure surrounding a transformer
encoder as described in "BERT: Pre-training of Deep Bidirectional Transformers
for Language Understanding" (https://arxiv.org/abs/1810.04805).
[Note] Please use the new BertPretrainerV2 for your projects.
The BertPretrainer allows a user to pass in a transformer stack, and
instantiates the masked language model and classification networks that are
...
...
@@ -159,7 +157,6 @@ class BertPretrainer(tf.keras.Model):
return
cls
(
**
config
)
# TODO(hongkuny): Migrate to BertPretrainerV2 for all usages.
@
tf
.
keras
.
utils
.
register_keras_serializable
(
package
=
'Text'
)
@
gin
.
configurable
class
BertPretrainerV2
(
tf
.
keras
.
Model
):
...
...
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