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

Function TEST

tensorflow/core/framework/common_shape_fns_test.cc:52–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50} // namespace
51
52TEST(CommonShapeFnsTest, NoOutputShapeTest) {
53 OpRegistrationData op_reg_data;
54 TF_CHECK_OK(OpDefBuilder("Assert")
55 .Input("condition: bool")
56 .Input("data: float")
57 .Finalize(&op_reg_data));
58 OpDef op_def = op_reg_data.op_def;
59
60 NodeDef def;
61 TF_CHECK_OK(NodeDefBuilder("test", "Assert")
62 .Input("condition", 0, DT_BOOL)
63 .Input({{"data", 0, DT_FLOAT}})
64 .Finalize(&def));
65
66 InferenceContext c(TF_GRAPH_DEF_VERSION, &def, op_def, {S({}), S({10})}, {},
67 {}, {});
68 TF_EXPECT_OK(NoOutputs(&c));
69 EXPECT_EQ(0, c.num_outputs());
70}
71
72TEST(CommonShapeFnsTest, ScalarShapeTest) {
73 OpRegistrationData op_reg_data;

Callers

nothing calls this directly

Calls 15

OpDefBuilderClass · 0.85
NodeDefBuilderClass · 0.85
NoOutputsFunction · 0.85
BiasAddShapeFunction · 0.85
BiasAddGradShapeFunction · 0.85
ValidateSparseTensorFunction · 0.85
ValueKnownMethod · 0.80
RankKnownMethod · 0.80
SFunction · 0.70
ScalarShapeFunction · 0.70
MatMulShapeFunction · 0.70
UnknownFunction · 0.70

Tested by

no test coverage detected