We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06a15a9 commit 49ef7ceCopy full SHA for 49ef7ce
_unittests/ut_light_api/test_light_api.py
@@ -472,6 +472,23 @@ def test_if(self):
472
got = ref.run(None, {"X": -x})
473
self.assertEqualArray(np.array([0], dtype=np.int64), got[0])
474
475
+ def test_domain(self):
476
+ onx = (
477
+ start()
478
+ .vin("X")
479
+ .reshape((-1, 1))
480
+ .dom["ai.onnx.ml"].Normalizer(norm="L1")
481
+ .rename("Y")
482
+ .vout()
483
+ .to_onnx()
484
+ )
485
+ self.assertIsInstance(onx, ModelProto)
486
+ self.assertIn("Transpose", str(onx))
487
+ ref = ReferenceEvaluator(onx)
488
+ a = np.arange(10).astype(np.float32)
489
+ got = ref.run(None, {"X": a})[0]
490
+ self.assertEqualArray(a.reshape((-1, 1)).T, got)
491
+
492
493
if __name__ == "__main__":
494
TestLightApi().test_if()
0 commit comments