Skip to content

Commit

Permalink
Modification to handle the case when there is no output (#2593)
Browse files Browse the repository at this point in the history
Signed-off-by: Alankar Mahajan <quic_alanmaha@quicinc.com>
  • Loading branch information
quic-alanmaha authored and quic-bharathr committed Sep 13, 2024
1 parent f8ef91f commit 23a2843
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def forward(self, *args) -> torch.Tensor:

res = torch.Tensor(res).type(torch.int64)
out = torch.zeros(batch_scores.shape[0] * batch_scores.shape[1] * self.max_output_boxes_per_class, 3, dtype=torch.int64)
indices = torch.arange(0, len(res) * len(res[0]), dtype=torch.int64)
indices = torch.arange(0, len(res) * 3, dtype=torch.int64)
out.put_(indices, res)
return out

Expand Down

0 comments on commit 23a2843

Please sign in to comment.