mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-05 23:38:42 +08:00
save image_coords as non-persistent buffer (#1216)
Co-authored-by: Matthew Tancik <tancik@berkeley.edu>
This commit is contained in:
1 parent
23ca7a7cc8
commit
bd1060ee83
1 file changed
+1
-1
@@ -36,7 +36,7 @@ class RayGenerator(nn.Module):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
self.cameras = cameras
|
self.cameras = cameras
|
||||||
self.pose_optimizer = pose_optimizer
|
self.pose_optimizer = pose_optimizer
|
||||||
self.image_coords = nn.Parameter(cameras.get_image_coords(), requires_grad=False)
|
self.register_buffer("image_coords", cameras.get_image_coords(), persistent=False)
|
||||||
|
|
||||||
def forward(self, ray_indices: TensorType["num_rays", 3]) -> RayBundle:
|
def forward(self, ray_indices: TensorType["num_rays", 3]) -> RayBundle:
|
||||||
"""Index into the cameras to generate the rays.
|
"""Index into the cameras to generate the rays.
|
||||||
|
|||||||
Reference in new issue
Block a user