MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/core/ops/linalg_ops_test.cc:24–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace tensorflow {
23
24TEST(LinalgOpsTest, MatrixDeterminant_ShapeFn) {
25 ShapeInferenceTestOp op("MatrixDeterminant");
26 INFER_OK(op, "?", "?");
27 INFER_ERROR("Shape must be at least rank 2 but is rank 1", op, "[1]");
28 INFER_ERROR("Dimensions must be equal, but are 2 and 1", op, "[1,?,3,4,1,2]");
29
30 INFER_OK(op, "[?,?]", "[]");
31 INFER_OK(op, "[1,?]", "[]");
32 INFER_OK(op, "[?,1]", "[]");
33
34 // Repeat previous block of tests with input rank > 2.
35 INFER_OK(op, "[1,?,3,4,?,?]", "[d0_0,d0_1,d0_2,d0_3]");
36 INFER_OK(op, "[1,?,3,4,1,?]", "[d0_0,d0_1,d0_2,d0_3]");
37 INFER_OK(op, "[1,?,3,4,?,1]", "[d0_0,d0_1,d0_2,d0_3]");
38}
39
40TEST(LinalgOpsTest, UnchangedSquare_ShapeFn) {
41 for (const char* op_name : {"Cholesky", "CholeskyGrad", "MatrixInverse"}) {

Callers

nothing calls this directly

Calls 4

NodeDefBuilderClass · 0.85
FinalizeMethod · 0.45
AttrMethod · 0.45
InputMethod · 0.45

Tested by

no test coverage detected