Skip to content

Commit

Permalink
Fix some deprecation warnings from PyTorch (#3348)
Browse files Browse the repository at this point in the history
Reviewed By: fmassa

Differential Revision: D26341413

fbshipit-source-id: ce0e3f3f7c69367db105f73dca986bcf0ecab70a
  • Loading branch information
datumbox authored and facebook-github-bot committed Feb 10, 2021
1 parent 1dbc6f9 commit 483a08d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion torchvision/models/detection/retinanet.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def compute_loss(self, targets, head_outputs, anchors, matched_idxs):
losses.append(torch.nn.functional.l1_loss(
bbox_regression_per_image,
target_regression,
size_average=False
reduction='sum'
) / max(1, num_foreground))

return _sum(losses) / max(1, len(targets))
Expand Down
2 changes: 1 addition & 1 deletion torchvision/transforms/_functional_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def crop(clip, i, j, h, w):
def resize(clip, target_size, interpolation_mode):
assert len(target_size) == 2, "target size should be tuple (height, width)"
return torch.nn.functional.interpolate(
clip, size=target_size, mode=interpolation_mode
clip, size=target_size, mode=interpolation_mode, align_corners=False
)


Expand Down

0 comments on commit 483a08d

Please sign in to comment.