yifehuang97 commited on
Commit
20914e5
·
1 Parent(s): f517a75
Files changed (1) hide show
  1. utils.py +4 -1
utils.py CHANGED
@@ -55,7 +55,10 @@ def post_process_grounded_object_detection_with_queries(
55
  Now also returns the query embeddings for each kept prediction.
56
  """
57
  logits, boxes = outputs.logits, outputs.pred_boxes
58
- assert len(logits) == queries.shape[0], "logits and queries must have the same batch size, but got {} and {}".format(len(logits), queries.shape[0])
 
 
 
59
 
60
  probs = torch.sigmoid(logits) # (batch_size, num_queries, 256)
61
  scores = torch.max(probs, dim=-1)[0] # (batch_size, num_queries)
 
55
  Now also returns the query embeddings for each kept prediction.
56
  """
57
  logits, boxes = outputs.logits, outputs.pred_boxes
58
+ print("logits: ", logits.shape)
59
+ print("boxes: ", boxes.shape)
60
+ print("queries: ", queries.shape)
61
+ assert len(logits[0]) == queries.shape[0], "logits and queries must have the same batch size, but got {} and {}".format(len(logits), queries.shape[0])
62
 
63
  probs = torch.sigmoid(logits) # (batch_size, num_queries, 256)
64
  scores = torch.max(probs, dim=-1)[0] # (batch_size, num_queries)