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

Function TEST_F

tensorflow/core/kernels/summary_op_test.cc:59–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57};
58
59TEST_F(SummaryScalarOpTest, SimpleFloat) {
60 MakeOp(DT_FLOAT);
61
62 // Feed and run
63 AddInputFromArray<tstring>(TensorShape({3}), {"tag1", "tag2", "tag3"});
64 AddInputFromArray<float>(TensorShape({3}), {1.0f, -0.73f, 10000.0f});
65 TF_ASSERT_OK(RunOpKernel());
66
67 // Check the output size.
68 Tensor* out_tensor = GetOutput(0);
69 ASSERT_EQ(0, out_tensor->dims());
70 Summary summary;
71 ParseProtoUnlimited(&summary, out_tensor->scalar<tstring>()());
72 EXPECT_SummaryMatches(summary, R"(
73 value { tag: 'tag1' simple_value: 1.0 }
74 value { tag: 'tag2' simple_value: -0.73 }
75 value { tag: 'tag3' simple_value: 10000.0 }
76 )");
77}
78
79TEST_F(SummaryScalarOpTest, SimpleDouble) {
80 MakeOp(DT_DOUBLE);

Callers

nothing calls this directly

Calls 11

GetOutputFunction · 0.85
ParseProtoUnlimitedFunction · 0.85
tagMethod · 0.80
DecodeFromProtoMethod · 0.80
EXPECT_SummaryMatchesFunction · 0.70
TensorShapeClass · 0.50
StrContainsFunction · 0.50
dimsMethod · 0.45
ToStringMethod · 0.45
valueMethod · 0.45
SerializeAsStringMethod · 0.45

Tested by

no test coverage detected