src.tests.spconv_cross_batch_test
Classes
- class src.tests.spconv_cross_batch_test.SpConvCrossBatchTest
- Author:
Alberto M. Esmoris Pena
Cross-batch invariance regression gate for the dense-gather SpConv design. The dense-gather pathway is collision-free by construction: each receptive field’s table indices are offset into a disjoint range of the concatenated feature tensor, so there is no shared keyspace between batch elements. A future refactor that reintroduces a shared hash table or mis-offsets the indices is caught here.
The test’s central invariant: with
training=False(BN uses moving statistics, deterministic), a receptive field’s predicted probabilities must be identical (up to a small floating-point band) whether the RF is processed alone (batch_size=1) or alongside others (batch_size > 1).Subtests cover batch size, hierarchy depth, submanifold window, and density. The dense-gather design satisfies the invariant for all configurations; the matrix is preserved as a forward-looking regression gate.
- __init__()
Basic configuration for any VL3D test.
- Parameters:
name (str) – Test name
- run()
Run the test.
- Returns:
True if test is successfully passed, False otherwise.
- Return type:
bool
- subtest_R1_baseline_B2_depth1()
- subtest_R2_B4_depth1()
- subtest_R3_B8_depth1()
- subtest_R4_B4_depth2()
- subtest_R5_B8_depth3()
- subtest_R6_w2()
- subtest_R7_dense()
- subtest_R8_sparse()
- subtest_R9_depth2_w2()
- subtest_R10_depth3_w2()
- subtest_E1a_B1_depth1()
- subtest_E1b_B1_depth3()
- subtest_E1c_B1_depth2_w2()
- subtest_E2a_B16_depth1()
- subtest_E2b_B16_depth2()
- subtest_E2c_B32_depth1()
- subtest_E3a_B4_w3()
- subtest_E3b_B4_wD3()
- subtest_E3c_B8_depth2_w2()
- subtest_E4a_minimal_density()
- subtest_E4b_minimal_depth2()
- subtest_E5a_dense_depth1()
- subtest_E5b_dense_depth2()
- subtest_E6a_adjacent_B2()
- subtest_E6b_adjacent_B4()
- subtest_E6c_adjacent_deep()