Update modeling_minicpmv.py
Browse files- modeling_minicpmv.py +2 -0
modeling_minicpmv.py
CHANGED
|
@@ -280,6 +280,8 @@ class MiniCPMV(MiniCPMVPreTrainedModel):
|
|
| 280 |
padded_tensors = [torch.nn.functional.pad(tensor, (0, max_length - tensor.shape[1])) for tensor in batch]
|
| 281 |
|
| 282 |
# Step 3: Stack the padded tensors into a single batch
|
|
|
|
|
|
|
| 283 |
batch = torch.cat(padded_tensors, dim=0)
|
| 284 |
|
| 285 |
# output_ids = self._decode(input_embeds, tokenizer, **kwargs)
|
|
|
|
| 280 |
padded_tensors = [torch.nn.functional.pad(tensor, (0, max_length - tensor.shape[1])) for tensor in batch]
|
| 281 |
|
| 282 |
# Step 3: Stack the padded tensors into a single batch
|
| 283 |
+
for stuff in batch:
|
| 284 |
+
print(stuff.shape, "SHAPE")
|
| 285 |
batch = torch.cat(padded_tensors, dim=0)
|
| 286 |
|
| 287 |
# output_ids = self._decode(input_embeds, tokenizer, **kwargs)
|