Upload modeling_mic21.py with huggingface_hub
Browse files- modeling_mic21.py +2 -2
modeling_mic21.py
CHANGED
|
@@ -65,8 +65,8 @@ class MIC21SummarizerModel(PreTrainedModel):
|
|
| 65 |
|
| 66 |
def forward(self, images, titles):
|
| 67 |
pdb.set_trace()
|
| 68 |
-
prepared_images = self.components["image_processor"](images,return_tensors="pt"
|
| 69 |
-
prepared_images = prepared_images
|
| 70 |
#prepared_images = prepared_images.to(f"cuda:{self.im_model_cuda_id}")
|
| 71 |
|
| 72 |
img_features = self.components["image_model"](**prepared_images,output_hidden_states=True)
|
|
|
|
| 65 |
|
| 66 |
def forward(self, images, titles):
|
| 67 |
pdb.set_trace()
|
| 68 |
+
prepared_images = self.components["image_processor"](images,return_tensors="pt")
|
| 69 |
+
prepared_images["pixel_values"] = prepared_images["pixel_values"].cuda()
|
| 70 |
#prepared_images = prepared_images.to(f"cuda:{self.im_model_cuda_id}")
|
| 71 |
|
| 72 |
img_features = self.components["image_model"](**prepared_images,output_hidden_states=True)
|