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
25f81c28
"docs/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "83f8a5ff70d9305735b23131ed2015d3db0e7422"
Commit
25f81c28
authored
Aug 25, 2017
by
Yusu Pan
Committed by
Soumith Chintala
Aug 25, 2017
Browse files
fix unbroadcastable UserWarning in inception.py (#231)
parent
eafab6bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
torchvision/models/inception.py
torchvision/models/inception.py
+1
-0
No files found.
torchvision/models/inception.py
View file @
25f81c28
...
@@ -62,6 +62,7 @@ class Inception3(nn.Module):
...
@@ -62,6 +62,7 @@ class Inception3(nn.Module):
stddev
=
m
.
stddev
if
hasattr
(
m
,
'stddev'
)
else
0.1
stddev
=
m
.
stddev
if
hasattr
(
m
,
'stddev'
)
else
0.1
X
=
stats
.
truncnorm
(
-
2
,
2
,
scale
=
stddev
)
X
=
stats
.
truncnorm
(
-
2
,
2
,
scale
=
stddev
)
values
=
torch
.
Tensor
(
X
.
rvs
(
m
.
weight
.
data
.
numel
()))
values
=
torch
.
Tensor
(
X
.
rvs
(
m
.
weight
.
data
.
numel
()))
values
=
values
.
view
(
m
.
weight
.
data
.
size
())
m
.
weight
.
data
.
copy_
(
values
)
m
.
weight
.
data
.
copy_
(
values
)
elif
isinstance
(
m
,
nn
.
BatchNorm2d
):
elif
isinstance
(
m
,
nn
.
BatchNorm2d
):
m
.
weight
.
data
.
fill_
(
1
)
m
.
weight
.
data
.
fill_
(
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