change ident
Browse files
tsr/models/nerf_renderer.py
CHANGED
@@ -37,7 +37,7 @@ class TriplaneNeRFRenderer(BaseModule):
|
|
37 |
chunk_size >= 0
|
38 |
), "chunk_size must be a non-negative integer (0 for no chunking)."
|
39 |
self.chunk_size = chunk_size
|
40 |
-
|
41 |
coords = torch.linspace(-1.0, 1.0, resolution, device = device)
|
42 |
x, y, z = torch.meshgrid(coords[0:chunk_size], coords, coords, indexing="ij")
|
43 |
x = x.reshape(-1, 1)
|
|
|
37 |
chunk_size >= 0
|
38 |
), "chunk_size must be a non-negative integer (0 for no chunking)."
|
39 |
self.chunk_size = chunk_size
|
40 |
+
def make_step_grid(self,device, resolution: int, chunk_size: int = 32):
|
41 |
coords = torch.linspace(-1.0, 1.0, resolution, device = device)
|
42 |
x, y, z = torch.meshgrid(coords[0:chunk_size], coords, coords, indexing="ij")
|
43 |
x = x.reshape(-1, 1)
|