sayakpaul HF staff commited on
Commit
2fbae88
1 Parent(s): ffb234a

debugging confidence dict.

Browse files
Files changed (1) hide show
  1. app.py +1 -0
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