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
9055250a
Unverified
Commit
9055250a
authored
May 20, 2020
by
Francisco Massa
Committed by
GitHub
May 20, 2020
Browse files
Deprecate Conv2d, ConvTranspose2d and BatchNorm2d (#2244)
* Deprecate Conv2d, ConvTranspose2d and BatchNorm * Fix lint
parent
cb655900
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
torchvision/ops/misc.py
torchvision/ops/misc.py
+24
-0
No files found.
torchvision/ops/misc.py
View file @
9055250a
...
...
@@ -18,6 +18,30 @@ import torch
from
torchvision.ops
import
_new_empty_tensor
class
Conv2d
(
torch
.
nn
.
Conv2d
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
().
__init__
(
*
args
,
**
kwargs
)
warnings
.
warn
(
"torchvision.ops.misc.Conv2d is deprecated and will be "
"removed in future versions, use torch.nn.Conv2d instead."
,
FutureWarning
)
class
ConvTranspose2d
(
torch
.
nn
.
ConvTranspose2d
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
().
__init__
(
*
args
,
**
kwargs
)
warnings
.
warn
(
"torchvision.ops.misc.ConvTranspose2d is deprecated and will be "
"removed in future versions, use torch.nn.ConvTranspose2d instead."
,
FutureWarning
)
class
BatchNorm2d
(
torch
.
nn
.
BatchNorm2d
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
().
__init__
(
*
args
,
**
kwargs
)
warnings
.
warn
(
"torchvision.ops.misc.BatchNorm2d is deprecated and will be "
"removed in future versions, use torch.nn.BatchNorm2d instead."
,
FutureWarning
)
def
_check_size_scale_factor
(
dim
,
size
,
scale_factor
):
# type: (int, Optional[List[int]], Optional[float]) -> None
if
size
is
None
and
scale_factor
is
None
:
...
...
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