Skip to content

Commit

Permalink
fix bug in gradient computation
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed Hassan committed Dec 10, 2019
1 parent 9b6ab62 commit 3b3552e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions mesh_intersection/loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,14 @@ def forward(self, triangles, collision_idxs):

recv_triangles = triangles[batch_idxs, receiver_faces]
intr_triangles = triangles[batch_idxs, intruder_faces]
with torch.no_grad():
recv_normals = normals[batch_idxs, receiver_faces]
recv_circumradius = circumradius[batch_idxs, receiver_faces]
recv_circumcenter = circumcenter[batch_idxs, receiver_faces]

intr_normals = normals[batch_idxs, intruder_faces]
intr_circumradius = circumradius[batch_idxs, intruder_faces]
intr_circumcenter = circumcenter[batch_idxs, intruder_faces]

recv_normals = normals[batch_idxs, receiver_faces]
recv_circumradius = circumradius[batch_idxs, receiver_faces]
recv_circumcenter = circumcenter[batch_idxs, receiver_faces]

intr_normals = normals[batch_idxs, intruder_faces]
intr_circumradius = circumradius[batch_idxs, intruder_faces]
intr_circumcenter = circumcenter[batch_idxs, intruder_faces]

# Compute the distance field for the intruding triangles
# B x NUM_COLLISIONS x 3
Expand Down

0 comments on commit 3b3552e

Please sign in to comment.