mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-20 14:20:38 +08:00
work with old linalg
Summary: solve and lstsq have moved around in torch. Cope with both. Reviewed By: patricklabatut Differential Revision: D29302316 fbshipit-source-id: b34f0b923e90a357f20df359635929241eba6e74
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5284de6e97
commit
b8790474f1
@@ -10,13 +10,10 @@ import unittest
|
||||
import numpy as np
|
||||
import torch
|
||||
from common_testing import TestCaseMixin
|
||||
from pytorch3d.common.compat import qr
|
||||
from pytorch3d.transforms.rotation_conversions import random_rotations
|
||||
from pytorch3d.transforms.se3 import se3_exp_map, se3_log_map
|
||||
from pytorch3d.transforms.so3 import (
|
||||
so3_exp_map,
|
||||
so3_log_map,
|
||||
so3_rotation_angle,
|
||||
)
|
||||
from pytorch3d.transforms.so3 import so3_exp_map, so3_log_map, so3_rotation_angle
|
||||
|
||||
|
||||
class TestSE3(TestCaseMixin, unittest.TestCase):
|
||||
@@ -201,7 +198,7 @@ class TestSE3(TestCaseMixin, unittest.TestCase):
|
||||
r = [identity, rot180]
|
||||
r.extend(
|
||||
[
|
||||
torch.qr(identity + torch.randn_like(identity) * 1e-6)[0]
|
||||
qr(identity + torch.randn_like(identity) * 1e-6)[0]
|
||||
+ float(i > batch_size // 2) * (0.5 - torch.rand_like(identity)) * 1e-8
|
||||
# this adds random noise to the second half
|
||||
# of the random orthogonal matrices to generate
|
||||
|
||||
Reference in New Issue
Block a user