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
chenpangpang
transformers
Commits
88b31773
Commit
88b31773
authored
Nov 27, 2019
by
root
Committed by
Lysandre Debut
Nov 27, 2019
Browse files
Fix issue: #1962, input's shape seem to cause error in 2.2.0 version tf_albert_model
parent
45d76729
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
transformers/modeling_tf_albert.py
transformers/modeling_tf_albert.py
+1
-1
No files found.
transformers/modeling_tf_albert.py
View file @
88b31773
...
@@ -645,7 +645,7 @@ class TFAlbertModel(TFAlbertPreTrainedModel):
...
@@ -645,7 +645,7 @@ class TFAlbertModel(TFAlbertPreTrainedModel):
if
input_ids
is
not
None
and
inputs_embeds
is
not
None
:
if
input_ids
is
not
None
and
inputs_embeds
is
not
None
:
raise
ValueError
(
"You cannot specify both input_ids and inputs_embeds at the same time"
)
raise
ValueError
(
"You cannot specify both input_ids and inputs_embeds at the same time"
)
elif
input_ids
is
not
None
:
elif
input_ids
is
not
None
:
input_shape
=
input_ids
.
shape
input_shape
=
tf
.
shape
(
input_ids
)
elif
inputs_embeds
is
not
None
:
elif
inputs_embeds
is
not
None
:
input_shape
=
inputs_embeds
.
shape
[:
-
1
]
input_shape
=
inputs_embeds
.
shape
[:
-
1
]
else
:
else
:
...
...
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