mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 03:42:50 +08:00
Looser gradient check in test_rasterize_meshes
Summary: This has been failing intermittently Reviewed By: nikhilaravi Differential Revision: D21403157 fbshipit-source-id: 51b74d6c813b52effe72d14b565e250fcabbb463
This commit is contained in:
parent
06ad1fb6c4
commit
8fc28baa27
@ -13,7 +13,6 @@ std::tuple<at::Tensor, at::Tensor> KNearestNeighborIdxCpu(
|
||||
const int N = p1.size(0);
|
||||
const int P1 = p1.size(1);
|
||||
const int D = p1.size(2);
|
||||
const int P2 = p2.size(1);
|
||||
|
||||
auto long_opts = p1.options().dtype(torch::kInt64);
|
||||
torch::Tensor idxs = torch::full({N, P1, K}, 0, long_opts);
|
||||
|
@ -507,7 +507,7 @@ class TestRasterizeMeshes(TestCaseMixin, unittest.TestCase):
|
||||
grad_var1.grad.data.zero_()
|
||||
loss2.backward()
|
||||
grad_verts2 = grad_var2.grad.data.clone().cpu()
|
||||
self.assertClose(grad_verts1, grad_verts2, rtol=1e-3)
|
||||
self.assertClose(grad_verts1, grad_verts2, rtol=2e-3)
|
||||
|
||||
def _test_perspective_correct(self, rasterize_meshes_fn, device, bin_size=None):
|
||||
# fmt: off
|
||||
|
Loading…
x
Reference in New Issue
Block a user