mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-21 23:00:34 +08:00
Remove pytorch3d's wrappers for eigh, solve, lstsq, qr
Summary: Remove the compat functions eigh, solve, lstsq, and qr. Migrate callers to use torch.linalg directly. Reviewed By: bottler Differential Revision: D39172949 fbshipit-source-id: 484230a553237808f06ee5cdfde64651cba91c4c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9a1213e0e5
commit
d4a1051e0f
@@ -16,7 +16,6 @@ from typing import NamedTuple, Optional
|
||||
|
||||
import torch
|
||||
import torch.nn.functional as F
|
||||
from pytorch3d.common.compat import eigh
|
||||
from pytorch3d.ops import points_alignment, utils as oputil
|
||||
|
||||
|
||||
@@ -106,7 +105,7 @@ def _null_space(m, kernel_dim):
|
||||
kernel vectors, of size B x kernel_dim
|
||||
"""
|
||||
mTm = torch.bmm(m.transpose(1, 2), m)
|
||||
s, v = eigh(mTm)
|
||||
s, v = torch.linalg.eigh(mTm)
|
||||
return v[:, :, :kernel_dim].reshape(-1, 4, 3, kernel_dim), s[:, :kernel_dim]
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
from typing import Tuple, TYPE_CHECKING, Union
|
||||
|
||||
import torch
|
||||
from pytorch3d.common.compat import eigh
|
||||
from pytorch3d.common.workaround import symeig3x3
|
||||
|
||||
from .utils import convert_pointclouds_to_tensor, get_point_covariances
|
||||
@@ -147,7 +146,7 @@ def estimate_pointcloud_local_coord_frames(
|
||||
if use_symeig_workaround:
|
||||
curvatures, local_coord_frames = symeig3x3(cov, eigenvectors=True)
|
||||
else:
|
||||
curvatures, local_coord_frames = eigh(cov)
|
||||
curvatures, local_coord_frames = torch.linalg.eigh(cov)
|
||||
|
||||
# disambiguate the directions of individual principal vectors
|
||||
if disambiguate_directions:
|
||||
|
||||
Reference in New Issue
Block a user