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
OpenPCDet
Commits
cddcf9ba
Commit
cddcf9ba
authored
Nov 23, 2021
by
Shaoshuai Shi
Browse files
move spconv_utils.py to pcdet/utils/, update find_all_spconv_keys()
parent
511244e2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
pcdet/models/backbones_3d/spconv_backbone.py
pcdet/models/backbones_3d/spconv_backbone.py
+1
-1
pcdet/models/backbones_3d/spconv_unet.py
pcdet/models/backbones_3d/spconv_unet.py
+1
-1
pcdet/models/roi_heads/partA2_head.py
pcdet/models/roi_heads/partA2_head.py
+1
-1
pcdet/utils/spconv_utils.py
pcdet/utils/spconv_utils.py
+1
-1
No files found.
pcdet/models/backbones_3d/spconv_backbone.py
View file @
cddcf9ba
...
@@ -2,7 +2,7 @@ from functools import partial
...
@@ -2,7 +2,7 @@ from functools import partial
import
torch.nn
as
nn
import
torch.nn
as
nn
from
...spconv_utils
import
replace_feature
,
spconv
from
...
utils.
spconv_utils
import
replace_feature
,
spconv
def
post_act_block
(
in_channels
,
out_channels
,
kernel_size
,
indice_key
=
None
,
stride
=
1
,
padding
=
0
,
def
post_act_block
(
in_channels
,
out_channels
,
kernel_size
,
indice_key
=
None
,
stride
=
1
,
padding
=
0
,
...
...
pcdet/models/backbones_3d/spconv_unet.py
View file @
cddcf9ba
...
@@ -3,7 +3,7 @@ from functools import partial
...
@@ -3,7 +3,7 @@ from functools import partial
import
torch
import
torch
import
torch.nn
as
nn
import
torch.nn
as
nn
from
...spconv_utils
import
replace_feature
,
spconv
from
...
utils.
spconv_utils
import
replace_feature
,
spconv
from
...utils
import
common_utils
from
...utils
import
common_utils
from
.spconv_backbone
import
post_act_block
from
.spconv_backbone
import
post_act_block
...
...
pcdet/models/roi_heads/partA2_head.py
View file @
cddcf9ba
...
@@ -3,7 +3,7 @@ import torch
...
@@ -3,7 +3,7 @@ import torch
import
torch.nn
as
nn
import
torch.nn
as
nn
from
...ops.roiaware_pool3d
import
roiaware_pool3d_utils
from
...ops.roiaware_pool3d
import
roiaware_pool3d_utils
from
...spconv_utils
import
spconv
from
...
utils.
spconv_utils
import
spconv
from
.roi_head_template
import
RoIHeadTemplate
from
.roi_head_template
import
RoIHeadTemplate
...
...
pcdet/spconv_utils.py
→
pcdet/
utils/
spconv_utils.py
View file @
cddcf9ba
...
@@ -16,7 +16,7 @@ def find_all_spconv_keys(model: nn.Module, prefix="") -> Set[str]:
...
@@ -16,7 +16,7 @@ def find_all_spconv_keys(model: nn.Module, prefix="") -> Set[str]:
for
name
,
child
in
model
.
named_children
():
for
name
,
child
in
model
.
named_children
():
new_prefix
=
f
"
{
prefix
}
.
{
name
}
"
if
prefix
!=
""
else
name
new_prefix
=
f
"
{
prefix
}
.
{
name
}
"
if
prefix
!=
""
else
name
if
isinstance
(
child
,
(
spconv
.
SubMConv3d
,
sp
conv
.
SparseConv
3d
,
spconv
.
SparseInverseConv3d
)
):
if
isinstance
(
child
,
spconv
.
conv
.
SparseConv
olution
):
new_prefix
=
f
"
{
new_prefix
}
.weight"
new_prefix
=
f
"
{
new_prefix
}
.weight"
found_keys
.
add
(
new_prefix
)
found_keys
.
add
(
new_prefix
)
...
...
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