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
2cbcddb1
Commit
2cbcddb1
authored
Dec 04, 2020
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 345761218
parent
277ea3cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
official/nlp/modeling/models/bert_span_labeler.py
official/nlp/modeling/models/bert_span_labeler.py
+5
-0
No files found.
official/nlp/modeling/models/bert_span_labeler.py
View file @
2cbcddb1
...
@@ -63,6 +63,11 @@ class BertSpanLabeler(tf.keras.Model):
...
@@ -63,6 +63,11 @@ class BertSpanLabeler(tf.keras.Model):
else
:
else
:
sequence_output
=
outputs
[
'sequence_output'
]
sequence_output
=
outputs
[
'sequence_output'
]
# The input network (typically a transformer model) may get outputs from all
# layers. When this case happens, we retrieve the last layer output.
if
isinstance
(
sequence_output
,
list
):
sequence_output
=
sequence_output
[
-
1
]
# This is an instance variable for ease of access to the underlying task
# This is an instance variable for ease of access to the underlying task
# network.
# network.
span_labeling
=
networks
.
SpanLabeling
(
span_labeling
=
networks
.
SpanLabeling
(
...
...
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