Skip to content

Commit

Permalink
Fix issues woth inplace modification of tensors in BaseInstance3DBoxes (
Browse files Browse the repository at this point in the history
  • Loading branch information
filaPro authored Jan 22, 2021
1 parent f472787 commit 0a7fb9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mmdet3d/core/bbox/structures/base_box3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(self, tensor, box_dim=7, with_yaw=True, origin=(0.5, 0.5, 0)):
else:
self.box_dim = box_dim
self.with_yaw = with_yaw
self.tensor = tensor
self.tensor = tensor.clone()

if origin != (0.5, 0.5, 0):
dst = self.tensor.new_tensor((0.5, 0.5, 0))
Expand Down
2 changes: 1 addition & 1 deletion mmdet3d/core/bbox/structures/cam_box3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(self,
else:
self.box_dim = box_dim
self.with_yaw = with_yaw
self.tensor = tensor
self.tensor = tensor.clone()

if origin != (0.5, 1.0, 0.5):
dst = self.tensor.new_tensor((0.5, 1.0, 0.5))
Expand Down

0 comments on commit 0a7fb9c

Please sign in to comment.