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
31f6758a
Unverified
Commit
31f6758a
authored
Feb 01, 2023
by
jihan.yang
Committed by
GitHub
Feb 01, 2023
Browse files
Fixbug: torch.cuda.amp rather than torch.amp.cuda in loss (#1252)
* Fixbug: torch.cuda.amp rather than torch.amp.cuda
parent
633db6be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
pcdet/utils/loss_utils.py
pcdet/utils/loss_utils.py
+1
-1
No files found.
pcdet/utils/loss_utils.py
View file @
31f6758a
...
...
@@ -148,7 +148,7 @@ class WeightedL1Loss(nn.Module):
self
.
code_weights
=
np
.
array
(
code_weights
,
dtype
=
np
.
float32
)
self
.
code_weights
=
torch
.
from_numpy
(
self
.
code_weights
).
cuda
()
@
torch
.
amp
.
cuda
.
custom_fwd
(
cast_inputs
=
torch
.
float16
)
@
torch
.
cuda
.
amp
.
custom_fwd
(
cast_inputs
=
torch
.
float16
)
def
forward
(
self
,
input
:
torch
.
Tensor
,
target
:
torch
.
Tensor
,
weights
:
torch
.
Tensor
=
None
):
"""
Args:
...
...
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