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
c4e1586d
"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "464aa74659b9711d2d64159ab82e1c49fa739fb7"
Unverified
Commit
c4e1586d
authored
Aug 12, 2021
by
Gunjan Chhablani
Committed by
GitHub
Aug 12, 2021
Browse files
Fix VisualBert Embeddings (#13017)
parent
53b38d62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/visual_bert/modeling_visual_bert.py
src/transformers/models/visual_bert/modeling_visual_bert.py
+1
-1
No files found.
src/transformers/models/visual_bert/modeling_visual_bert.py
View file @
c4e1586d
...
@@ -123,7 +123,7 @@ class VisualBertEmbeddings(nn.Module):
...
@@ -123,7 +123,7 @@ class VisualBertEmbeddings(nn.Module):
inputs_embeds
=
self
.
word_embeddings
(
input_ids
)
inputs_embeds
=
self
.
word_embeddings
(
input_ids
)
if
token_type_ids
is
None
:
if
token_type_ids
is
None
:
token_type_ids
=
torch
.
zeros
(
input_shape
,
dtype
=
torch
.
long
,
device
=
self
.
input_embe
ds
.
device
)
token_type_ids
=
torch
.
zeros
(
input_shape
,
dtype
=
torch
.
long
,
device
=
self
.
position_i
ds
.
device
)
token_type_embeddings
=
self
.
token_type_embeddings
(
token_type_ids
)
token_type_embeddings
=
self
.
token_type_embeddings
(
token_type_ids
)
...
...
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