Skip to content

Fix equivolume batch broadcasting#992

Open
ShiroKSH wants to merge 1 commit into
NVIDIAGameWorks:masterfrom
ShiroKSH:fix/equivolume-batch-broadcasting
Open

Fix equivolume batch broadcasting#992
ShiroKSH wants to merge 1 commit into
NVIDIAGameWorks:masterfrom
ShiroKSH:fix/equivolume-batch-broadcasting

Conversation

@ShiroKSH

Copy link
Copy Markdown

Summary

  • reshape per-mesh tetrahedron means along the batch axis
  • add a regression test with different batch and tetrahedron counts
  • correct the documented output shape and example values

Root cause

equivolume reduced tetrahedron volumes to a tensor of shape (B,), then reshaped it to (1, B) before subtracting it from volumes shaped (B, T). This raised a broadcasting error when B != T and mixed means between meshes when B == T.

The mean now has shape (B, 1), so each mesh is compared with its own mean volume.

Validation

  • all four TestTetMeshMetrics checks pass in an isolated CPU PyTorch environment
  • batched output matches per-mesh evaluation
  • backward pass produces finite gradients; gradcheck passes
  • flake8 and py_compile pass for the changed files

Signed-off-by: ShiroKSH <kushidashiro@gmail.com>
@ShiroKSH
ShiroKSH marked this pull request as ready for review July 10, 2026 21:09
@ShiroKSH

Copy link
Copy Markdown
Author

@Caenorst - could you take a look at the equivolume batch-broadcasting fix in this PR when you have a chance, or route it to the right reviewer? I can make any requested changes or add tests. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant