Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
88d18d66
Unverified
Commit
88d18d66
authored
Feb 04, 2021
by
Francisco Massa
Committed by
GitHub
Feb 04, 2021
Browse files
Fix some deprecation warnings from PyTorch (#3348)
parent
bda17ddf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
torchvision/models/detection/retinanet.py
torchvision/models/detection/retinanet.py
+1
-1
torchvision/transforms/_functional_video.py
torchvision/transforms/_functional_video.py
+1
-1
No files found.
torchvision/models/detection/retinanet.py
View file @
88d18d66
...
@@ -201,7 +201,7 @@ class RetinaNetRegressionHead(nn.Module):
...
@@ -201,7 +201,7 @@ class RetinaNetRegressionHead(nn.Module):
losses
.
append
(
torch
.
nn
.
functional
.
l1_loss
(
losses
.
append
(
torch
.
nn
.
functional
.
l1_loss
(
bbox_regression_per_image
,
bbox_regression_per_image
,
target_regression
,
target_regression
,
size_average
=
False
reduction
=
'sum'
)
/
max
(
1
,
num_foreground
))
)
/
max
(
1
,
num_foreground
))
return
_sum
(
losses
)
/
max
(
1
,
len
(
targets
))
return
_sum
(
losses
)
/
max
(
1
,
len
(
targets
))
...
...
torchvision/transforms/_functional_video.py
View file @
88d18d66
...
@@ -23,7 +23,7 @@ def crop(clip, i, j, h, w):
...
@@ -23,7 +23,7 @@ def crop(clip, i, j, h, w):
def
resize
(
clip
,
target_size
,
interpolation_mode
):
def
resize
(
clip
,
target_size
,
interpolation_mode
):
assert
len
(
target_size
)
==
2
,
"target size should be tuple (height, width)"
assert
len
(
target_size
)
==
2
,
"target size should be tuple (height, width)"
return
torch
.
nn
.
functional
.
interpolate
(
return
torch
.
nn
.
functional
.
interpolate
(
clip
,
size
=
target_size
,
mode
=
interpolation_mode
clip
,
size
=
target_size
,
mode
=
interpolation_mode
,
align_corners
=
False
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment