Commit 8fc28baa authored by Jeremy Reizenstein's avatar Jeremy Reizenstein Committed by Facebook GitHub Bot
Browse files

Looser gradient check in test_rasterize_meshes

Summary: This has been failing intermittently

Reviewed By: nikhilaravi

Differential Revision: D21403157

fbshipit-source-id: 51b74d6c813b52effe72d14b565e250fcabbb463
parent 06ad1fb6
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment