Commit e2408c69 authored by Kishore Venkateshan's avatar Kishore Venkateshan Committed by Facebook GitHub Bot
Browse files

Unit test for face_ddp

Summary: Simple test to see if face_dpdt produces the right jacobian for a set of triangles with random sizes.

Differential Revision: D68598423

fbshipit-source-id: b25e198e5f5835c28f1ccb74c15c4370273a8da1
parent 910228e6
......@@ -55,6 +55,17 @@ def face_dpdt(
where: N - batch size; F - number of triangles
"""
if v.ndim != 3:
raise ValueError(f"Expected v to be 3D, got {v.ndim}D")
if vt.ndim != 3:
raise ValueError(f"Expected vt to be 3D, got {vt.ndim}D")
if vt.shape[0] != v.shape[0]:
raise ValueError(
f"Expected vt to have the same batch size as v, got {vt.shape[0]} and {v.shape[0]}"
)
v012 = v[:, vi]
vt012 = vt[:, vti]
......
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