ultralytics 8.1.9 replace .size(0) with .shape[0] (#7957)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
66b32bb4dd
commit
70d4a3752e
15 changed files with 42 additions and 22 deletions
|
|
@ -56,8 +56,8 @@ class TaskAlignedAssigner(nn.Module):
|
|||
fg_mask (Tensor): shape(bs, num_total_anchors)
|
||||
target_gt_idx (Tensor): shape(bs, num_total_anchors)
|
||||
"""
|
||||
self.bs = pd_scores.size(0)
|
||||
self.n_max_boxes = gt_bboxes.size(1)
|
||||
self.bs = pd_scores.shape[0]
|
||||
self.n_max_boxes = gt_bboxes.shape[1]
|
||||
|
||||
if self.n_max_boxes == 0:
|
||||
device = gt_bboxes.device
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue