Skip to content

Commit a948a50

Browse files
committed
add test
1 parent 6369d66 commit a948a50

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/TorchSharpTest/LinearAlgebra.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,12 @@ public void VectorNormTest()
641641

642642
Assert.Equal(5.4344883f, b.item<float>());
643643
Assert.Equal(5.4344883f, c.item<float>());
644+
645+
var d = linalg.vector_norm(a, ord: 2);
646+
var e = linalg.vector_norm(a);
647+
648+
Assert.Equal(7.7459669f, d.item<float>());
649+
Assert.Equal(7.7459669f, e.item<float>());
644650
}
645651
}
646652

0 commit comments

Comments
 (0)