Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
751e2460
Commit
751e2460
authored
Oct 10, 2019
by
thomwolf
Browse files
using tf.print in roberta
parent
c9e8c519
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
transformers/modeling_tf_roberta.py
transformers/modeling_tf_roberta.py
+1
-1
No files found.
transformers/modeling_tf_roberta.py
View file @
751e2460
...
@@ -74,7 +74,7 @@ class TFRobertaMainLayer(TFBertMainLayer):
...
@@ -74,7 +74,7 @@ class TFRobertaMainLayer(TFBertMainLayer):
input_ids
=
inputs
input_ids
=
inputs
if
tf
.
not_equal
(
tf
.
reduce_sum
(
input_ids
[:,
0
]),
0
):
if
tf
.
not_equal
(
tf
.
reduce_sum
(
input_ids
[:,
0
]),
0
):
logger
.
warn
in
g
(
"A sequence with no special tokens has been passed to the RoBERTa model. "
tf
.
pr
in
t
(
"A sequence with no special tokens has been passed to the RoBERTa model. "
"This model requires special tokens in order to work. "
"This model requires special tokens in order to work. "
"Please specify add_special_tokens=True in your encoding."
)
"Please specify add_special_tokens=True in your encoding."
)
...
...
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