mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-22 23:30:35 +08:00
Experimental glTF reading
Summary: Experimental data loader for taking the default scene from a GLB file and converting it to a single mesh in PyTorch3D. Reviewed By: nikhilaravi Differential Revision: D25900167 fbshipit-source-id: bff22ac00298b83a0bd071ae5c8923561e1d81d7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
0e85652f07
commit
ed6983ea84
@@ -155,7 +155,7 @@ class TestCaseMixin(unittest.TestCase):
|
||||
)
|
||||
|
||||
if not close and msg is None:
|
||||
diff = backend.abs(input - other) + 0.0
|
||||
diff = backend.abs(input + 0.0 - other)
|
||||
ratio = diff / backend.abs(other)
|
||||
try_relative = (diff <= atol) | (backend.isfinite(ratio) & (ratio > 0))
|
||||
if try_relative.all():
|
||||
@@ -167,7 +167,9 @@ class TestCaseMixin(unittest.TestCase):
|
||||
else:
|
||||
extra = ""
|
||||
shape = tuple(input.shape)
|
||||
loc = np.unravel_index(diff.argmax(), shape)
|
||||
max_diff = diff.max()
|
||||
self.fail(f"Not close. Max diff {max_diff}.{extra} Shape {shape}.")
|
||||
msg = f"Not close. Max diff {max_diff}.{extra} Shape {shape}. At {loc}."
|
||||
self.fail(msg)
|
||||
|
||||
self.assertTrue(close, msg)
|
||||
|
||||
Reference in New Issue
Block a user