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
d5637696
Commit
d5637696
authored
Nov 27, 2018
by
kwu
Committed by
Francisco Massa
Nov 27, 2018
Browse files
Changing to AdaptiveAvgPool2d on DenseNet (#672)
* Changing to AdaptiveAvgPool2d * add whitespace
parent
50d9dc5f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torchvision/models/densenet.py
torchvision/models/densenet.py
+1
-1
No files found.
torchvision/models/densenet.py
View file @
d5637696
...
@@ -112,7 +112,7 @@ class DenseNet(nn.Module):
...
@@ -112,7 +112,7 @@ class DenseNet(nn.Module):
def
forward
(
self
,
x
):
def
forward
(
self
,
x
):
features
=
self
.
features
(
x
)
features
=
self
.
features
(
x
)
out
=
F
.
relu
(
features
,
inplace
=
True
)
out
=
F
.
relu
(
features
,
inplace
=
True
)
out
=
F
.
avg_pool2d
(
out
,
kernel_size
=
7
,
stride
=
1
).
view
(
features
.
size
(
0
),
-
1
)
out
=
F
.
adaptive_
avg_pool2d
(
out
,
(
1
,
1
)
).
view
(
features
.
size
(
0
),
-
1
)
out
=
self
.
classifier
(
out
)
out
=
self
.
classifier
(
out
)
return
out
return
out
...
...
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