Skip to content

Commit

Permalink
Fix VisualBert Embeddings (#13017)
Browse files Browse the repository at this point in the history
  • Loading branch information
gchhablani committed Aug 12, 2021
1 parent 53b38d6 commit c4e1586
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -123,7 +123,7 @@ def forward(
inputs_embeds = self.word_embeddings(input_ids)

if token_type_ids is None:
token_type_ids = torch.zeros(input_shape, dtype=torch.long, device=self.input_embeds.device)
token_type_ids = torch.zeros(input_shape, dtype=torch.long, device=self.position_ids.device)

token_type_embeddings = self.token_type_embeddings(token_type_ids)

Expand Down

0 comments on commit c4e1586

Please sign in to comment.