Update modeling_gpt2vision.py
Browse files- modeling_gpt2vision.py +4 -0
modeling_gpt2vision.py
CHANGED
|
@@ -92,6 +92,10 @@ class GPT2Vision(PreTrainedModel):
|
|
| 92 |
batch = {"image": [image], "text": prompt}
|
| 93 |
encoded_batch = self.tokenize_encode(batch, self.device)
|
| 94 |
inputs_embeds, attention_mask, input_ids = self.preprocess_inputs(encoded_batch)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
output_sequences = self.language_model.generate(
|
| 96 |
inputs_embeds=inputs_embeds,
|
| 97 |
attention_mask=attention_mask,
|
|
|
|
| 92 |
batch = {"image": [image], "text": prompt}
|
| 93 |
encoded_batch = self.tokenize_encode(batch, self.device)
|
| 94 |
inputs_embeds, attention_mask, input_ids = self.preprocess_inputs(encoded_batch)
|
| 95 |
+
|
| 96 |
+
print("input_embeds",inputs_embeds.size())
|
| 97 |
+
print("attention_mask",attention_mask.size())
|
| 98 |
+
|
| 99 |
output_sequences = self.language_model.generate(
|
| 100 |
inputs_embeds=inputs_embeds,
|
| 101 |
attention_mask=attention_mask,
|