Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
one
spconv
Commits
583a6f00
"serialization/tests/TestSerializeRGForce.cpp" did not exist on "85da5e0f9018719e95350c76b483a2160c84d9d3"
Commit
583a6f00
authored
Apr 01, 2019
by
traveller59
Browse files
fix a bug when use 1x1 conv.
parent
63576251
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
spconv/conv.py
spconv/conv.py
+7
-3
No files found.
spconv/conv.py
View file @
583a6f00
...
...
@@ -131,12 +131,16 @@ class SparseConvolution(SparseModule):
# input.update_grid(out_spatial_shape)
# t = time.time()
if
self
.
conv1x1
:
input
.
features
=
torch
.
mm
(
features
=
torch
.
mm
(
input
.
features
,
self
.
weight
.
view
(
self
.
in_channels
,
self
.
out_channels
))
if
self
.
bias
is
not
None
:
input
.
features
+=
self
.
bias
return
input
features
+=
self
.
bias
out_tensor
=
spconv
.
SparseConvTensor
(
features
,
input
.
indices
,
input
.
spatial_shape
,
input
.
batch_size
)
out_tensor
.
indice_dict
=
input
.
indice_dict
out_tensor
.
grid
=
input
.
grid
return
out_tensor
datas
=
input
.
find_indice_pair
(
self
.
indice_key
)
if
self
.
inverse
:
assert
datas
is
not
None
and
self
.
indice_key
is
not
None
...
...
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