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
b87ba095
Commit
b87ba095
authored
Feb 05, 2018
by
Benjamin Thomas Graham
Browse files
Fixes for Issue #31
parent
11274575
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
PyTorch/sparseconvnet/convolution.py
PyTorch/sparseconvnet/convolution.py
+0
-4
PyTorch/sparseconvnet/deconvolution.py
PyTorch/sparseconvnet/deconvolution.py
+3
-1
No files found.
PyTorch/sparseconvnet/convolution.py
View file @
b87ba095
...
...
@@ -54,10 +54,6 @@ class ConvolutionFunction(Function):
def
backward
(
ctx
,
grad_output
):
grad_input
=
Variable
(
grad_output
.
data
.
new
())
grad_weight
=
Variable
(
grad_output
.
data
.
new
().
resize_as_
(
ctx
.
weight
).
zero_
())
if
ctx
.
bias
is
None
:
grad_bias
=
None
else
:
grad_bias
=
Variable
(
grad_output
.
data
.
new
().
resize_as_
(
bias
).
zero_
())
if
ctx
.
bias
is
None
:
grad_bias
=
None
else
:
...
...
PyTorch/sparseconvnet/deconvolution.py
View file @
b87ba095
...
...
@@ -127,4 +127,6 @@ class Deconvolution(Module):
return
s
def
input_spatial_size
(
self
,
out_size
):
return
(
out_size
-
1
)
*
self
.
filter_stride
+
self
.
filter_size
in_size
=
(
out_size
-
self
.
filter_size
)
/
self
.
filter_stride
+
1
assert
((
in_size
-
1
)
*
self
.
filter_stride
+
self
.
filter_size
==
out_size
).
all
()
return
in_size
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