mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 03:42:50 +08:00
fix clone type issue (#179)
Summary: a quick fix for the clone issue fixes https://github.com/facebookresearch/pytorch3d/issues/178 Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/179 Reviewed By: bottler Differential Revision: D21414309 Pulled By: nikhilaravi fbshipit-source-id: 359d7724aa5d78bc88a0a9ffc05e6041056e3b3f
This commit is contained in:
parent
a61c9376d5
commit
9c5ab57156
@ -185,7 +185,7 @@ class DirectionalLights(TensorProperties):
|
||||
raise ValueError(msg % repr(self.direction.shape))
|
||||
|
||||
def clone(self):
|
||||
other = DirectionalLights(device=self.device)
|
||||
other = self.__class__(device=self.device)
|
||||
return super().clone(other)
|
||||
|
||||
def diffuse(self, normals, points=None) -> torch.Tensor:
|
||||
@ -244,7 +244,7 @@ class PointLights(TensorProperties):
|
||||
raise ValueError(msg % repr(self.location.shape))
|
||||
|
||||
def clone(self):
|
||||
other = PointLights(device=self.device)
|
||||
other = self.__class__(device=self.device)
|
||||
return super().clone(other)
|
||||
|
||||
def diffuse(self, normals, points) -> torch.Tensor:
|
||||
|
Loading…
x
Reference in New Issue
Block a user