mirror of
				https://github.com/facebookresearch/pytorch3d.git
				synced 2025-11-04 18:02:14 +08:00 
			
		
		
		
	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 https://github.com/pytorch/pytorch/pull/70988. Created from CodeHub with https://fburl.com/edit-in-codehub Reviewed By: bottler Differential Revision: D39153103 fbshipit-source-id: 3a1397b6d86fb3e45e4777e06a4da3ee76591b32
This commit is contained in:
		
							parent
							
								
									1163eaab43
								
							
						
					
					
						commit
						1530a66469
					
				@ -87,7 +87,7 @@ def generate_eval_video_cameras(
 | 
			
		||||
            plane_normal = torch.FloatTensor(up)
 | 
			
		||||
        else:
 | 
			
		||||
            cov = (cam_centers_c.t() @ cam_centers_c) / cam_centers_c.shape[0]
 | 
			
		||||
            _, e_vec = torch.symeig(cov, eigenvectors=True)
 | 
			
		||||
            _, e_vec = torch.linalg.eigh(cov, UPLO="U")
 | 
			
		||||
            plane_normal = e_vec[:, 0]
 | 
			
		||||
 | 
			
		||||
        plane_dist = (plane_normal[None] * cam_centers_c).sum(dim=-1)
 | 
			
		||||
@ -96,7 +96,7 @@ def generate_eval_video_cameras(
 | 
			
		||||
        cov = (
 | 
			
		||||
            cam_centers_on_plane.t() @ cam_centers_on_plane
 | 
			
		||||
        ) / cam_centers_on_plane.shape[0]
 | 
			
		||||
        _, e_vec = torch.symeig(cov, eigenvectors=True)
 | 
			
		||||
        _, e_vec = torch.linalg.eigh(cov, UPLO="U")
 | 
			
		||||
        traj_radius = (cam_centers_on_plane**2).sum(dim=1).sqrt().mean()
 | 
			
		||||
        angle = torch.linspace(0, 2.0 * math.pi, n_eval_cams)
 | 
			
		||||
        traj = traj_radius * torch.stack(
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user