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

Function TEST_F

tensorflow/core/grappler/optimizers/model_pruner_test.cc:40–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38class ModelPrunerTest : public GrapplerTest {};
39
40TEST_F(ModelPrunerTest, NoPruning) {
41 // This trivial graph is so basic there's nothing to prune.
42 TrivialTestGraphInputYielder fake_input(4, 1, 10, false, {"CPU:0"});
43 GrapplerItem item;
44 ASSERT_TRUE(fake_input.NextItem(&item));
45
46 ModelPruner pruner;
47 GraphDef output;
48 TF_ASSERT_OK(pruner.Optimize(nullptr, item, &output));
49
50 CompareGraphs(item.graph, output);
51}
52
53TEST_F(ModelPrunerTest, StopGradientPruning) {
54 // Build a simple graph with a few trivially prunable ops.

Callers

nothing calls this directly

Calls 15

StopGradientFunction · 0.85
IdentityNFunction · 0.85
GetNumAvailableGPUsFunction · 0.85
WithOpNameMethod · 0.80
ConstFunction · 0.50
SqrtClass · 0.50
IdentityClass · 0.50
AddNFunction · 0.50
MergeFunction · 0.50
TensorShapeClass · 0.50
VariableClass · 0.50
NoOpFunction · 0.50

Tested by

no test coverage detected