Skip to content

Commit

Permalink
floor divide update - latest torch
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysdg committed Jul 12, 2022
1 parent ef6d92c commit e8db658
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def pred_squares(image,
flatten_acc_map = acc_map.reshape([-1, ])

scores, indices = torch.topk(flatten_acc_map, len(pts), dim=-1, largest=True)
yy = torch.floor_divide(indices, w).unsqueeze(-1)
yy = torch.div(indices, w, rounding_mode='floor').unsqueeze(-1)
xx = torch.fmod(indices, w).unsqueeze(-1)
yx = torch.cat((yy, xx), dim=-1)

Expand Down

0 comments on commit e8db658

Please sign in to comment.