Skip to content

Commit

Permalink
[Fix] Fix resize mix argument bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
mzr1996 committed Jan 4, 2024
1 parent 9ac4b31 commit e76681e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmpretrain/models/utils/batch_augments/resizemix.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def mix(self, batch_inputs: torch.Tensor,
(y1, y2, x1, x2), lam = self.cutmix_bbox_and_lam(img_shape, lam)
batch_inputs[:, :, y1:y2, x1:x2] = F.interpolate(
batch_inputs[index],
size=(y2 - y1, x2 - x1),
size=(int(y2 - y1), int(x2 - x1)),
mode=self.interpolation,
align_corners=False)
mixed_scores = lam * batch_scores + (1 - lam) * batch_scores[index, :]
Expand Down

0 comments on commit e76681e

Please sign in to comment.