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
7b6ce167
Unverified
Commit
7b6ce167
authored
Mar 01, 2023
by
Xiang Xu
Committed by
GitHub
Mar 01, 2023
Browse files
[Fix] fix UT for torch1.6 (#2318)
parent
d6818e0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
mmdet3d/datasets/transforms/transforms_3d.py
mmdet3d/datasets/transforms/transforms_3d.py
+4
-4
No files found.
mmdet3d/datasets/transforms/transforms_3d.py
View file @
7b6ce167
...
...
@@ -2592,14 +2592,14 @@ class LaserMix(BaseTransform):
rho
=
torch
.
sqrt
(
points
.
coord
[:,
0
]
**
2
+
points
.
coord
[:,
1
]
**
2
)
pitch
=
torch
.
atan2
(
points
.
coord
[:,
2
],
rho
)
pitch
=
torch
.
cl
i
p
(
pitch
,
self
.
pitch_angles
[
0
]
+
1e-5
,
self
.
pitch_angles
[
1
]
-
1e-5
)
pitch
=
torch
.
cl
am
p
(
pitch
,
self
.
pitch_angles
[
0
]
+
1e-5
,
self
.
pitch_angles
[
1
]
-
1e-5
)
mix_rho
=
torch
.
sqrt
(
mix_points
.
coord
[:,
0
]
**
2
+
mix_points
.
coord
[:,
1
]
**
2
)
mix_pitch
=
torch
.
atan2
(
mix_points
.
coord
[:,
2
],
mix_rho
)
mix_pitch
=
torch
.
cl
i
p
(
mix_pitch
,
self
.
pitch_angles
[
0
]
+
1e-5
,
self
.
pitch_angles
[
1
]
-
1e-5
)
mix_pitch
=
torch
.
cl
am
p
(
mix_pitch
,
self
.
pitch_angles
[
0
]
+
1e-5
,
self
.
pitch_angles
[
1
]
-
1e-5
)
num_areas
=
np
.
random
.
choice
(
self
.
num_areas
,
size
=
1
)[
0
]
angle_list
=
np
.
linspace
(
self
.
pitch_angles
[
1
],
self
.
pitch_angles
[
0
],
...
...
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