Unverified Commit 0a7fb9c7 authored by filaPro's avatar filaPro Committed by GitHub
Browse files

Fix issues woth inplace modification of tensors in BaseInstance3DBoxes (#283)

parent f4727874
...@@ -57,7 +57,7 @@ class BaseInstance3DBoxes(object): ...@@ -57,7 +57,7 @@ class BaseInstance3DBoxes(object):
else: else:
self.box_dim = box_dim self.box_dim = box_dim
self.with_yaw = with_yaw self.with_yaw = with_yaw
self.tensor = tensor self.tensor = tensor.clone()
if origin != (0.5, 0.5, 0): if origin != (0.5, 0.5, 0):
dst = self.tensor.new_tensor((0.5, 0.5, 0)) dst = self.tensor.new_tensor((0.5, 0.5, 0))
......
...@@ -63,7 +63,7 @@ class CameraInstance3DBoxes(BaseInstance3DBoxes): ...@@ -63,7 +63,7 @@ class CameraInstance3DBoxes(BaseInstance3DBoxes):
else: else:
self.box_dim = box_dim self.box_dim = box_dim
self.with_yaw = with_yaw self.with_yaw = with_yaw
self.tensor = tensor self.tensor = tensor.clone()
if origin != (0.5, 1.0, 0.5): if origin != (0.5, 1.0, 0.5):
dst = self.tensor.new_tensor((0.5, 1.0, 0.5)) dst = self.tensor.new_tensor((0.5, 1.0, 0.5))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment