Skip to content

Commit 1530a66

Browse files
kit1980facebook-github-bot
authored andcommitted
Update deprecated torch.symeig in vision/fair/pytorch3d/projects/nerf/nerf/eval_video_utils.py
Summary: torch.symeig is deprecated for a long time and is being removed by pytorch/pytorch#70988. Created from CodeHub with https://fburl.com/edit-in-codehub Reviewed By: bottler Differential Revision: D39153103 fbshipit-source-id: 3a1397b6d86fb3e45e4777e06a4da3ee76591b32
1 parent 1163eaa commit 1530a66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/nerf/nerf/eval_video_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def generate_eval_video_cameras(
8787
plane_normal = torch.FloatTensor(up)
8888
else:
8989
cov = (cam_centers_c.t() @ cam_centers_c) / cam_centers_c.shape[0]
90-
_, e_vec = torch.symeig(cov, eigenvectors=True)
90+
_, e_vec = torch.linalg.eigh(cov, UPLO="U")
9191
plane_normal = e_vec[:, 0]
9292

9393
plane_dist = (plane_normal[None] * cam_centers_c).sum(dim=-1)
@@ -96,7 +96,7 @@ def generate_eval_video_cameras(
9696
cov = (
9797
cam_centers_on_plane.t() @ cam_centers_on_plane
9898
) / cam_centers_on_plane.shape[0]
99-
_, e_vec = torch.symeig(cov, eigenvectors=True)
99+
_, e_vec = torch.linalg.eigh(cov, UPLO="U")
100100
traj_radius = (cam_centers_on_plane**2).sum(dim=1).sqrt().mean()
101101
angle = torch.linspace(0, 2.0 * math.pi, n_eval_cams)
102102
traj = traj_radius * torch.stack(

0 commit comments

Comments
 (0)