Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit49ef7ce

Browse files
committed
ut
1 parent06a15a9 commit49ef7ce

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

‎_unittests/ut_light_api/test_light_api.py‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,23 @@ def test_if(self):
472472
got=ref.run(None, {"X":-x})
473473
self.assertEqualArray(np.array([0],dtype=np.int64),got[0])
474474

475+
deftest_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+
475492

476493
if__name__=="__main__":
477494
TestLightApi().test_if()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp