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
SparseConvNet
Commits
7b42d166
"tools/git@developer.sourcefind.cn:OpenDAS/openpcdet.git" did not exist on "76279ff212dfbf16fd06a6e4a51e9bca02304b02"
Commit
7b42d166
authored
Oct 08, 2017
by
Ben Graham
Committed by
GitHub
Oct 08, 2017
Browse files
Update networkInNetwork.py
parent
710c4ff0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
PyTorch/sparseconvnet/networkInNetwork.py
PyTorch/sparseconvnet/networkInNetwork.py
+3
-2
No files found.
PyTorch/sparseconvnet/networkInNetwork.py
View file @
7b42d166
...
@@ -32,7 +32,7 @@ class NetworkInNetworkFunction(Function):
...
@@ -32,7 +32,7 @@ class NetworkInNetworkFunction(Function):
@
staticmethod
@
staticmethod
def
backward
(
ctx
,
grad_output
):
def
backward
(
ctx
,
grad_output
):
grad_input
=
Variable
(
grad_output
.
data
.
new
())
grad_input
=
Variable
(
grad_output
.
data
.
new
())
grad_weight
=
Variable
(
grad_output
.
data
.
new
().
resize_as_
(
ctx
.
weight
).
zero
())
grad_weight
=
Variable
(
grad_output
.
data
.
new
().
resize_as_
(
ctx
.
weight
).
zero
_
())
if
ctx
.
bias
is
None
:
if
ctx
.
bias
is
None
:
grad_bias
=
None
grad_bias
=
None
else
:
else
:
...
@@ -59,7 +59,8 @@ class NetworkInNetwork(Module):
...
@@ -59,7 +59,8 @@ class NetworkInNetwork(Module):
0
,
0
,
std
))
std
))
if
bias
:
if
bias
:
self
.
bias
=
Parameter
(
torch
.
Tensor
(
nOut
).
zero_
())
self
.
bias
=
Parameter
(
torch
.
Tensor
(
nOut
).
_
())
else
:
else
:
self
.
bias
=
None
self
.
bias
=
None
def
forward
(
self
,
input
):
def
forward
(
self
,
input
):
...
...
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