debugging confidence dict.
Browse files
app.py
CHANGED
@@ -113,6 +113,7 @@ def infer(video_file):
|
|
113 |
outputs = MODEL(**inputs)
|
114 |
logits = outputs.logits
|
115 |
softmax_scores = torch.nn.functional.softmax(logits, dim=0).squeeze(0)
|
|
|
116 |
confidences = {LABELS[i]: float(softmax_scores[i]) for i in range(len(LABELS))}
|
117 |
print(f"Confidence dict: {confidences}")
|
118 |
return confidences
|
|
|
113 |
outputs = MODEL(**inputs)
|
114 |
logits = outputs.logits
|
115 |
softmax_scores = torch.nn.functional.softmax(logits, dim=0).squeeze(0)
|
116 |
+
print(f"Softmax scores: {softmax_scores}.")
|
117 |
confidences = {LABELS[i]: float(softmax_scores[i]) for i in range(len(LABELS))}
|
118 |
print(f"Confidence dict: {confidences}")
|
119 |
return confidences
|