damerajee commited on
Commit
c3d5c9a
·
verified ·
1 Parent(s): d984c53

Update modeling_gpt2vision.py

Browse files
Files changed (1) hide show
  1. modeling_gpt2vision.py +2 -1
modeling_gpt2vision.py CHANGED
@@ -66,7 +66,8 @@ class GPT2Vision(PreTrainedModel):
66
  max_length=768,
67
  return_tensors="pt",
68
  ).to(device)
69
-
 
70
  # Adjust attention mask to account for image tokens and the extra <image> token
71
  batch_size = text_inputs.input_ids.shape[0]
72
  img_attention = torch.ones((batch_size, self.img_tokens + 1), dtype=torch.long, device=device)
 
66
  max_length=768,
67
  return_tensors="pt",
68
  ).to(device)
69
+
70
+ print("text_inputs",text_inputs)
71
  # Adjust attention mask to account for image tokens and the extra <image> token
72
  batch_size = text_inputs.input_ids.shape[0]
73
  img_attention = torch.ones((batch_size, self.img_tokens + 1), dtype=torch.long, device=device)