kornia/kornia

[Feature]: Increase test coverage for Se3, SO3 and So2 (exception, gradcheck, JIT, module)

Open

#3.531 geöffnet am 27. Jan. 2026

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Python (892 Forks)batch import
help wantedtriage

Repository-Metriken

Stars
 (8.677 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 19T 9h) (7 gemergte PRs in 30 T)

Beschreibung

Title: Increase test coverage for Se3, So3 and So2 (exception, gradcheck, JIT, module)

Description

The TestSe3 class in the test suite currently contains empty placeholder methods for several critical test categories:

  • test_exception: Should verify that invalid inputs (e.g., mismatched batch sizes between rotation and translation, or incorrect tensor shapes) raise appropriate errors.
  • test_gradcheck: Should perform a gradient check (using torch.autograd.gradcheck) to ensure the Se3 operations are differentiable and the gradients are numerically correct.
  • test_jit: Should verify that the Se3 class and its methods can be correctly scripted or traced by TorchScript (torch.jit).
  • test_module: Should verify that Se3 objects can be used as parameters or buffers within a nn.Module and properly saved/loaded.

Goal

Implement these missing tests to ensure the robustness and production-readiness of the Se3, So3 and So2 geometry primitives.

Contributor Guide