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
mmdetection3d
Commits
b8e6547c
Commit
b8e6547c
authored
May 12, 2020
by
zhangwenwei
Browse files
add unittest for fpn
parent
878c9ff8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
tests/test_fpn.py
tests/test_fpn.py
+37
-0
No files found.
tests/test_fpn.py
0 → 100644
View file @
b8e6547c
import
pytest
def
test_secfpn
():
neck_cfg
=
dict
(
type
=
'SECONDFPN'
,
in_channels
=
[
2
,
3
],
upsample_strides
=
[
1
,
2
],
out_channels
=
[
4
,
6
],
)
from
mmdet.models.builders
import
build_neck
neck
=
build_neck
(
neck_cfg
)
assert
neck
.
deblocks
[
0
][
0
].
in_channels
==
2
assert
neck
.
deblocks
[
1
][
0
].
in_channels
==
3
assert
neck
.
deblocks
[
0
][
0
].
out_channels
==
4
assert
neck
.
deblocks
[
1
][
0
].
out_channels
==
6
assert
neck
.
deblocks
[
0
][
0
].
stride
==
(
1
,
1
)
assert
neck
.
deblocks
[
1
][
0
].
stride
==
(
2
,
2
)
assert
neck
is
not
None
neck_cfg
=
dict
(
type
=
'SECONDFPN'
,
in_channels
=
[
2
,
2
],
upsample_strides
=
[
1
,
2
,
4
],
out_channels
=
[
2
,
2
],
)
with
pytest
.
raises
(
AssertionError
):
build_neck
(
neck_cfg
)
neck_cfg
=
dict
(
type
=
'SECONDFPN'
,
in_channels
=
[
2
,
2
,
4
],
upsample_strides
=
[
1
,
2
,
4
],
out_channels
=
[
2
,
2
],
)
with
pytest
.
raises
(
AssertionError
):
build_neck
(
neck_cfg
)
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