mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2026-03-12 23:46:00 +08:00
suppress errors in vision/fair/pytorch3d
Differential Revision: D33202801 fbshipit-source-id: d4cb0f4f4a8ad5a6519ce4b8c640e8f96fbeaccb
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ccfb72cc50
commit
315f2487db
@@ -163,6 +163,7 @@ class TensorProperties(nn.Module):
|
||||
msg = "Expected index of type int or slice; got %r"
|
||||
raise ValueError(msg % type(index))
|
||||
|
||||
# pyre-fixme[14]: `to` overrides method defined in `Module` inconsistently.
|
||||
def to(self, device: Device = "cpu") -> "TensorProperties":
|
||||
"""
|
||||
In place operation to move class properties which are tensors to a
|
||||
@@ -180,6 +181,7 @@ class TensorProperties(nn.Module):
|
||||
def cpu(self) -> "TensorProperties":
|
||||
return self.to("cpu")
|
||||
|
||||
# pyre-fixme[14]: `cuda` overrides method defined in `Module` inconsistently.
|
||||
def cuda(self, device: Optional[int] = None) -> "TensorProperties":
|
||||
return self.to(f"cuda:{device}" if device is not None else "cuda")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user