mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-12 19:04:03 +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__()
|
||||
self.cameras = cameras
|
||||
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:
|
||||
"""Index into the cameras to generate the rays.
|
||||
|
||||
Reference in new issue
Block a user