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

Function TEST_F

tensorflow/core/kernels/summary_image_op_test.cc:77–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75};
76
77TEST_F(SummaryImageOpTest, ThreeGrayImagesOutOfFive4dInput) {
78 MakeOp(3 /* max images */);
79
80 // Feed and run
81 AddInputFromArray<tstring>(TensorShape({}), {"tag"});
82 AddInputFromArray<float>(TensorShape({5, 2, 1, 1}),
83 {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0});
84 TF_ASSERT_OK(RunOpKernel());
85
86 // Check the output size.
87 Tensor* out_tensor = GetOutput(0);
88 ASSERT_EQ(0, out_tensor->dims());
89 Summary summary;
90 ParseProtoUnlimited(&summary, out_tensor->scalar<tstring>()());
91
92 CheckAndRemoveEncodedImages(&summary);
93 EXPECT_SummaryMatches(summary, R"(
94 value { tag: 'tag/image/0' image { width: 1 height: 2 colorspace: 1} }
95 value { tag: 'tag/image/1' image { width: 1 height: 2 colorspace: 1} }
96 value { tag: 'tag/image/2' image { width: 1 height: 2 colorspace: 1} }
97 )");
98}
99
100TEST_F(SummaryImageOpTest, OneGrayImage4dInput) {
101 MakeOp(1 /* max images */);

Callers

nothing calls this directly

Calls 5

GetOutputFunction · 0.85
ParseProtoUnlimitedFunction · 0.85
EXPECT_SummaryMatchesFunction · 0.70
TensorShapeClass · 0.50
dimsMethod · 0.45

Tested by

no test coverage detected