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
7c077f6a
Unverified
Commit
7c077f6a
authored
Mar 16, 2020
by
Charles Pao
Committed by
GitHub
Mar 16, 2020
Browse files
add comments for the modified implementation of ResNet (#1983)
Co-authored-by:
Charles Pao
<
dirtybluer@gmail.com
>
parent
1e369d3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
torchvision/models/resnet.py
torchvision/models/resnet.py
+6
-0
No files found.
torchvision/models/resnet.py
View file @
7c077f6a
...
...
@@ -73,6 +73,12 @@ class BasicBlock(nn.Module):
class
Bottleneck
(
nn
.
Module
):
# Bottleneck in torchvision places the stride for downsampling at 3x3 convolution(self.conv2)
# while original implementation places the stride at the first 1x1 convolution(self.conv1)
# according to "Deep residual learning for image recognition"https://arxiv.org/abs/1512.03385.
# This variant is also known as ResNet V1.5 and improves accuracy according to
# https://ngc.nvidia.com/catalog/model-scripts/nvidia:resnet_50_v1_5_for_pytorch.
expansion
=
4
def
__init__
(
self
,
inplanes
,
planes
,
stride
=
1
,
downsample
=
None
,
groups
=
1
,
...
...
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