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

Function TEST_F

tensorflow/core/grappler/optimizers/debug_stripper_test.cc:31–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29class DebugStripperTest : public GrapplerTest {};
30
31TEST_F(DebugStripperTest, OutputEqualToInput) {
32 tensorflow::Scope s = tensorflow::Scope::NewRootScope();
33 Output x = ops::Placeholder(s, DT_FLOAT, ops::Placeholder::Shape({}));
34 Output y = ops::Placeholder(s, DT_FLOAT, ops::Placeholder::Shape({}));
35 Output add = ops::Add(s, x, y);
36 Output result = ops::Identity(s, add);
37 GrapplerItem item;
38 TF_CHECK_OK(s.ToGraphDef(&item.graph));
39
40 DebugStripper optimizer;
41 GraphDef output;
42 EXPECT_EQ(optimizer.Optimize(nullptr, item, &output),
43 errors::Aborted("Nothing to do."));
44}
45
46TEST_F(DebugStripperTest, StripAssertOnTwoOutputs) {
47 tensorflow::Scope s = tensorflow::Scope::NewRootScope();

Callers

nothing calls this directly

Calls 15

IsControlInputFunction · 0.85
WithOpNameMethod · 0.80
nameMethod · 0.65
PlaceholderFunction · 0.50
ShapeClass · 0.50
AddFunction · 0.50
IdentityClass · 0.50
SplitFunction · 0.50
GreaterEqualFunction · 0.50
AssertFunction · 0.50
TensorShapeClass · 0.50
CheckNumericsFunction · 0.50

Tested by

no test coverage detected