mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-22 07:10:34 +08:00
textures device consistency
Summary: Ensure that `mesh2 = mesh.to(device)` doesn't change the device of `mesh.textures`. Reviewed By: nikhilaravi Differential Revision: D25978610 fbshipit-source-id: 0558cd62132965d8693ebeea05e42b8c1d16cfbf
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e58a730e6a
commit
d173a2f8da
@@ -1197,7 +1197,7 @@ class Meshes(object):
|
||||
if torch.is_tensor(v):
|
||||
setattr(other, k, v.to(device))
|
||||
if self.textures is not None:
|
||||
other.textures = self.textures.to(device)
|
||||
other.textures = other.textures.to(device)
|
||||
return other
|
||||
|
||||
def cpu(self):
|
||||
|
||||
Reference in New Issue
Block a user