Spaces:
Sleeping
Sleeping
Varun Wadhwa
commited on
Logs
Browse files
app.py
CHANGED
@@ -151,8 +151,8 @@ def evaluate_model(model, dataloader, device):
|
|
151 |
# Process each sequence in the batch
|
152 |
for i in range(current_batch_size):
|
153 |
valid_mask = (labels[i] != -100) & (attention_mask[i] != 0)
|
154 |
-
valid_preds = preds[i][valid_mask
|
155 |
-
valid_labels = labels[i][valid_mask
|
156 |
print(valid_mask.dtype)
|
157 |
print(labels[i].shape)
|
158 |
print(labels[i])
|
|
|
151 |
# Process each sequence in the batch
|
152 |
for i in range(current_batch_size):
|
153 |
valid_mask = (labels[i] != -100) & (attention_mask[i] != 0)
|
154 |
+
valid_preds = preds[i][valid_mask].flatten()
|
155 |
+
valid_labels = labels[i][valid_mask].flatten()
|
156 |
print(valid_mask.dtype)
|
157 |
print(labels[i].shape)
|
158 |
print(labels[i])
|