Unverified Commit 107d7466 authored by Yuanchen Guo's avatar Yuanchen Guo Committed by GitHub
Browse files

Change dummy variable in Grid to tensor instead of parameter. (#83)

parent f9be5ad3
...@@ -66,7 +66,7 @@ class Grid(nn.Module): ...@@ -66,7 +66,7 @@ class Grid(nn.Module):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super().__init__() super().__init__()
self._dummy = torch.nn.Parameter(torch.empty(0)) self.register_buffer("_dummy", torch.empty(0), persistent=False)
@property @property
def device(self) -> torch.device: def device(self) -> torch.device:
......
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