"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "464aa74659b9711d2d64159ab82e1c49fa739fb7"
Unverified Commit c4e1586d authored by Gunjan Chhablani's avatar Gunjan Chhablani Committed by GitHub
Browse files

Fix VisualBert Embeddings (#13017)

parent 53b38d62
...@@ -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_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) token_type_embeddings = self.token_type_embeddings(token_type_ids)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment