xrg
commited on
Commit
·
29c1deb
1
Parent(s):
3a7d40d
fix bug
Browse files- core/tensorBase.py +2 -0
core/tensorBase.py
CHANGED
|
@@ -286,6 +286,8 @@ class TensorBase(torch.nn.Module):
|
|
| 286 |
print(xyz_sampled.device)
|
| 287 |
print(self.aabb[0].device)
|
| 288 |
print(self.invaabbSize.device)
|
|
|
|
|
|
|
| 289 |
|
| 290 |
return (xyz_sampled-self.aabb[0]) * self.invaabbSize - 1
|
| 291 |
|
|
|
|
| 286 |
print(xyz_sampled.device)
|
| 287 |
print(self.aabb[0].device)
|
| 288 |
print(self.invaabbSize.device)
|
| 289 |
+
if xyz_sampled.device!=invaabbSize.device:
|
| 290 |
+
self.invaabbSize=self.invaabbSize.to(xyz_sampled.device)
|
| 291 |
|
| 292 |
return (xyz_sampled-self.aabb[0]) * self.invaabbSize - 1
|
| 293 |
|