Home
last modified time | relevance | path

Searched refs:graph_def (Results 1 – 25 of 305) sorted by relevance

12345678910>>...13

/external/tensorflow/tensorflow/tools/graph_transforms/
Dsort_by_execution_order_test.cc33 void GetOrder(const GraphDef& graph_def, std::map<string, int>* order) { in GetOrder() argument
34 for (int i = 0; i < graph_def.node_size(); ++i) { in GetOrder()
35 const NodeDef& node = graph_def.node(i); in GetOrder()
41 GraphDef graph_def; in TestSimpleAdd() local
42 NodeDef* add_node = graph_def.add_node(); in TestSimpleAdd()
48 NodeDef* b_node = graph_def.add_node(); in TestSimpleAdd()
52 NodeDef* a_node = graph_def.add_node(); in TestSimpleAdd()
57 TF_ASSERT_OK(SortByExecutionOrder(graph_def, &result)); in TestSimpleAdd()
67 GraphDef graph_def; in TestSimpleLinear() local
69 NodeDef* negative_node = graph_def.add_node(); in TestSimpleLinear()
[all …]
Dstrip_unused_nodes_test.cc40 GraphDef graph_def; in TestSimpleAdd() local
41 NodeDef* add_node = graph_def.add_node(); in TestSimpleAdd()
47 NodeDef* a_node = graph_def.add_node(); in TestSimpleAdd()
51 NodeDef* b_node = graph_def.add_node(); in TestSimpleAdd()
55 NodeDef* c_node = graph_def.add_node(); in TestSimpleAdd()
60 TF_ASSERT_OK(StripUnusedNodes(graph_def, {{}, {"add_node"}}, &result)); in TestSimpleAdd()
71 GraphDef graph_def; in TestCommonAncestor() local
73 NodeDef* add_node1 = graph_def.add_node(); in TestCommonAncestor()
79 NodeDef* add_node2 = graph_def.add_node(); in TestCommonAncestor()
85 NodeDef* add_node3 = graph_def.add_node(); in TestCommonAncestor()
[all …]
Dremove_nodes_test.cc39 GraphDef graph_def; in TestRemoveNodes() local
41 NodeDef* add_node1 = graph_def.add_node(); in TestRemoveNodes()
47 NodeDef* add_node2 = graph_def.add_node(); in TestRemoveNodes()
53 NodeDef* add_node3 = graph_def.add_node(); in TestRemoveNodes()
59 NodeDef* identity_node1 = graph_def.add_node(); in TestRemoveNodes()
64 NodeDef* identity_node2 = graph_def.add_node(); in TestRemoveNodes()
69 NodeDef* identity_node3 = graph_def.add_node(); in TestRemoveNodes()
74 NodeDef* const_node1 = graph_def.add_node(); in TestRemoveNodes()
78 NodeDef* const_node2 = graph_def.add_node(); in TestRemoveNodes()
82 NodeDef* const_node3 = graph_def.add_node(); in TestRemoveNodes()
[all …]
Dsparsify_gather_test.cc42 const std::vector<NodeDef*>& inputs, GraphDef* graph_def, in CreateNode() argument
44 NodeDef* node_def = graph_def->add_node(); in CreateNode()
60 NodeDef* indices, GraphDef* graph_def) { in MakeGather() argument
63 CreateNode(strings::StrCat(name, "_axis"), "Const", {}, graph_def); in MakeGather()
67 CreateNode(name, "GatherV2", {params, indices, axis_node}, graph_def); in MakeGather()
69 CreateNode(name, "Gather", {params, indices}, graph_def); in MakeGather()
76 GraphDef graph_def; in TestSinglePartition() local
81 NodeDef* input_node = CreateNode("ids", "Const", {}, &graph_def); in TestSinglePartition()
92 w_node = CreateNode("w/part_1", "Const", {}, &graph_def); in TestSinglePartition()
95 w_node = CreateNode("w/part_1", "VariableV2", {}, &graph_def); in TestSinglePartition()
[all …]
Dbackports_test.cc43 GraphDef graph_def; in TestBackportConcatV2() local
45 NodeDef* mul_node1 = graph_def.add_node(); in TestBackportConcatV2()
51 NodeDef* add_node2 = graph_def.add_node(); in TestBackportConcatV2()
57 NodeDef* add_node3 = graph_def.add_node(); in TestBackportConcatV2()
63 NodeDef* const_node1 = graph_def.add_node(); in TestBackportConcatV2()
67 NodeDef* const_node2 = graph_def.add_node(); in TestBackportConcatV2()
71 NodeDef* const_node3 = graph_def.add_node(); in TestBackportConcatV2()
75 NodeDef* concat_node = graph_def.add_node(); in TestBackportConcatV2()
87 TF_ASSERT_OK(BackportConcatV2Transform(graph_def, context, &result)); in TestBackportConcatV2()
109 GraphDef graph_def; in TEST() local
[all …]
Dobfuscate_names_test.cc39 GraphDef graph_def; in TestSimpleTree() local
41 NodeDef* add_node1 = graph_def.add_node(); in TestSimpleTree()
47 NodeDef* add_node2 = graph_def.add_node(); in TestSimpleTree()
53 NodeDef* add_node3 = graph_def.add_node(); in TestSimpleTree()
59 NodeDef* const_node1 = graph_def.add_node(); in TestSimpleTree()
63 NodeDef* const_node2 = graph_def.add_node(); in TestSimpleTree()
67 NodeDef* const_node3 = graph_def.add_node(); in TestSimpleTree()
71 NodeDef* const_node4 = graph_def.add_node(); in TestSimpleTree()
77 ObfuscateNames(graph_def, {{"const_node1"}, {"add_node1"}}, &result)); in TestSimpleTree()
92 GraphDef graph_def; in TestManyNodes() local
[all …]
Dset_device_test.cc38 GraphDef graph_def; in CreateDeviceGraph() local
40 NodeDef* mul_node1 = graph_def.add_node(); in CreateDeviceGraph()
47 NodeDef* add_node2 = graph_def.add_node(); in CreateDeviceGraph()
54 NodeDef* add_node3 = graph_def.add_node(); in CreateDeviceGraph()
60 NodeDef* const_node1 = graph_def.add_node(); in CreateDeviceGraph()
64 NodeDef* const_node2 = graph_def.add_node(); in CreateDeviceGraph()
68 NodeDef* const_node3 = graph_def.add_node(); in CreateDeviceGraph()
72 NodeDef* add_node4 = graph_def.add_node(); in CreateDeviceGraph()
78 return graph_def; in CreateDeviceGraph()
83 GraphDef graph_def = CreateDeviceGraph(); in TEST() local
[all …]
Dremove_device_test.cc39 GraphDef graph_def; in TestRemoveDevice() local
41 NodeDef* mul_node1 = graph_def.add_node(); in TestRemoveDevice()
48 NodeDef* add_node2 = graph_def.add_node(); in TestRemoveDevice()
55 NodeDef* add_node3 = graph_def.add_node(); in TestRemoveDevice()
61 NodeDef* const_node1 = graph_def.add_node(); in TestRemoveDevice()
65 NodeDef* const_node2 = graph_def.add_node(); in TestRemoveDevice()
69 NodeDef* const_node3 = graph_def.add_node(); in TestRemoveDevice()
73 NodeDef* add_node4 = graph_def.add_node(); in TestRemoveDevice()
83 TF_ASSERT_OK(RemoveDevice(graph_def, context, &result)); in TestRemoveDevice()
Drename_op_test.cc39 GraphDef graph_def; in TestRenameOp() local
41 NodeDef* mul_node1 = graph_def.add_node(); in TestRenameOp()
47 NodeDef* add_node2 = graph_def.add_node(); in TestRenameOp()
53 NodeDef* add_node3 = graph_def.add_node(); in TestRenameOp()
59 NodeDef* const_node1 = graph_def.add_node(); in TestRenameOp()
63 NodeDef* const_node2 = graph_def.add_node(); in TestRenameOp()
67 NodeDef* const_node3 = graph_def.add_node(); in TestRenameOp()
71 NodeDef* add_node4 = graph_def.add_node(); in TestRenameOp()
85 TF_ASSERT_OK(RenameOp(graph_def, context, &result)); in TestRenameOp()
Dremove_attribute_test.cc39 GraphDef graph_def; in TestRemoveAttribute() local
41 NodeDef* mul_node1 = graph_def.add_node(); in TestRemoveAttribute()
49 NodeDef* add_node2 = graph_def.add_node(); in TestRemoveAttribute()
58 NodeDef* add_node3 = graph_def.add_node(); in TestRemoveAttribute()
64 NodeDef* const_node1 = graph_def.add_node(); in TestRemoveAttribute()
68 NodeDef* const_node2 = graph_def.add_node(); in TestRemoveAttribute()
72 NodeDef* const_node3 = graph_def.add_node(); in TestRemoveAttribute()
76 NodeDef* add_node4 = graph_def.add_node(); in TestRemoveAttribute()
90 TF_ASSERT_OK(RemoveAttribute(graph_def, context, &wildcard_result)); in TestRemoveAttribute()
109 RemoveAttribute(graph_def, targeted_context, &targeted_result)); in TestRemoveAttribute()
/external/tensorflow/tensorflow/core/graph/
Dvalidate_test.cc44 GraphDef graph_def; in TEST() local
46 CHECK(parser.MergeFromString(graph_def_str, &graph_def)) << graph_def_str; in TEST()
47 TF_ASSERT_OK(graph::ValidateGraphDef(graph_def, *OpRegistry::Global())); in TEST()
59 GraphDef graph_def; in TEST() local
61 CHECK(parser.MergeFromString(graph_def_str, &graph_def)) << graph_def_str; in TEST()
62 Status s = graph::ValidateGraphDef(graph_def, *OpRegistry::Global()); in TEST()
67 TF_ASSERT_OK(AddDefaultAttrsToGraphDef(&graph_def, *OpRegistry::Global(), 0)); in TEST()
70 TF_ASSERT_OK(graph::ValidateGraphDef(graph_def, *OpRegistry::Global())); in TEST()
82 GraphDef graph_def; in TEST() local
84 CHECK(parser.MergeFromString(graph_def_str, &graph_def)) << graph_def_str; in TEST()
[all …]
/external/tensorflow/tensorflow/core/framework/
Dgraph_def_util_test.cc44 GraphDef graph_def; in TEST() local
46 .Finalize(graph_def.add_node())); in TEST()
57 GraphDef graph_def; in TEST() local
59 .Finalize(graph_def.add_node())); in TEST()
60 GraphDef expected_graph_def = graph_def; in TEST()
63 TF_ASSERT_OK(RemoveNewDefaultAttrsFromGraphDef(&graph_def, registry, registry, in TEST()
66 TF_EXPECT_GRAPH_EQ(expected_graph_def, graph_def); in TEST()
77 GraphDef graph_def; in TEST() local
80 .Finalize(graph_def.add_node())); in TEST()
81 GraphDef expected_graph_def = graph_def; in TEST()
[all …]
Dgraph_def_util.cc38 string SummarizeGraphDef(const GraphDef& graph_def) { in SummarizeGraphDef() argument
41 &ret, "versions = ", graph_def.versions().ShortDebugString(), ";\n"); in SummarizeGraphDef()
42 for (const NodeDef& node : graph_def.node()) { in SummarizeGraphDef()
48 Status ValidateExternalGraphDefSyntax(const GraphDef& graph_def) { in ValidateExternalGraphDefSyntax() argument
49 for (const NodeDef& node : graph_def.node()) { in ValidateExternalGraphDefSyntax()
55 Status AddDefaultAttrsToGraphDef(GraphDef* graph_def, in AddDefaultAttrsToGraphDef() argument
58 return AddDefaultAttrsToGraphDef(graph_def, op_registry, node_offset, false); in AddDefaultAttrsToGraphDef()
61 Status AddDefaultAttrsToGraphDef(GraphDef* graph_def, in AddDefaultAttrsToGraphDef() argument
64 if (node_offset > graph_def->node_size()) { in AddDefaultAttrsToGraphDef()
68 node_offset, " with total nodes in graph: ", graph_def->node_size()); in AddDefaultAttrsToGraphDef()
[all …]
Dgraph_def_util.h32 string SummarizeGraphDef(const GraphDef& graph_def);
46 Status ValidateExternalGraphDefSyntax(const GraphDef& graph_def);
57 Status AddDefaultAttrsToGraphDef(GraphDef* graph_def,
63 Status AddDefaultAttrsToGraphDef(GraphDef* graph_def,
98 GraphDef* graph_def, const OpRegistryInterface& consumer_op_registry,
117 void OpsUsedByGraph(const GraphDef& graph_def,
129 Status StrippedOpListForGraph(const GraphDef& graph_def,
/external/tensorflow/tensorflow/core/grappler/
Dmutable_graph_view_test.cc145 GraphDef graph_def = test::function::GDef( in TEST() local
152 MutableGraphView graph(&graph_def); in TEST()
173 GraphDef graph_def; in TEST() local
174 MutableGraphView graph(&graph_def); in TEST()
180 EXPECT_EQ(graph_def.library().function_size(), 1); in TEST()
186 GraphDef graph_def = test::function::GDef({}, {x_times_two}); in TEST() local
187 MutableGraphView graph(&graph_def); in TEST()
192 EXPECT_EQ(graph_def.library().function_size(), 1); in TEST()
199 GraphDef graph_def = test::function::GDef({}, {x_times_four}); in TEST() local
200 MutableGraphView graph(&graph_def); in TEST()
[all …]
/external/tensorflow/tensorflow/core/grappler/optimizers/data/
Dgraph_utils_test.cc41 GraphDef graph_def; in TEST() local
42 MutableGraphView graph(&graph_def); in TEST()
49 GraphDef graph_def; in TEST() local
50 MutableGraphView graph(&graph_def); in TEST()
57 GraphDef graph_def; in TEST() local
58 MutableGraphView graph(&graph_def); in TEST()
65 GraphDef graph_def; in TEST() local
66 MutableGraphView graph(&graph_def); in TEST()
73 GraphDef graph_def; in TEST() local
74 MutableGraphView graph(&graph_def); in TEST()
[all …]
/external/tensorflow/tensorflow/core/kernels/data/
Drewrite_utils.cc85 GraphDef* graph_def, string* output_node) { in ApplyRewrites() argument
89 NodeDef* node = graph_def->mutable_node()->Add(); in ApplyRewrites()
90 tensorflow::grappler::graph_utils::SetUniqueGraphNodeName("Sink", graph_def, in ApplyRewrites()
102 for (auto& function_def : *graph_def->mutable_library()->mutable_function()) { in ApplyRewrites()
108 (*meta_graph_def.mutable_graph_def()) = *graph_def; in ApplyRewrites()
132 std::move(*grappler_item), config, ctx->device(), &cluster, graph_def)); in ApplyRewrites()
138 for (auto& function_def : *graph_def->mutable_library()->mutable_function()) { in ApplyRewrites()
151 GraphDef graph_def; in RewriteDataset() local
154 AsGraphDefMinimal(ctx, input, &input_list, &graph_def, &output_node)); in RewriteDataset()
156 VLOG(3) << "Before graph rewrites: " << graph_def.DebugString(); in RewriteDataset()
[all …]
/external/tensorflow/tensorflow/core/lib/strings/
Dproto_serialization_test.cc32 GraphDef graph_def; in MakeGraphDef() local
34 NodeDef* node = graph_def.add_node(); in MakeGraphDef()
40 return graph_def; in MakeGraphDef()
47 GraphDef graph_def = MakeGraphDef(num_nodes); in BM_ProtoSerializationToString() local
52 SerializeToStringDeterministic(graph_def, &serialized)); in BM_ProtoSerializationToString()
61 GraphDef graph_def = MakeGraphDef(num_nodes); in BM_ProtoSerializationToBuffer() local
63 const size_t size = graph_def.ByteSizeLong(); in BM_ProtoSerializationToBuffer()
67 SerializeToBufferDeterministic(graph_def, buf.data(), size)); in BM_ProtoSerializationToBuffer()
75 GraphDef graph_def = MakeGraphDef(num_nodes); in BM_DeterministicProtoHash64() local
78 testing::DoNotOptimize(DeterministicProtoHash64(graph_def)); in BM_DeterministicProtoHash64()
/external/tensorflow/tensorflow/cc/tools/
Dfreeze_saved_model_test.cc62 const GraphDef& graph_def, const string& init_node, in InitializeSavedModelBundleSession() argument
66 TF_RETURN_IF_ERROR(saved_model_bundle->session->Create(graph_def)); in InitializeSavedModelBundleSession()
77 Status AddGraphDefToSavedModelBundle(const GraphDef& graph_def, in AddGraphDefToSavedModelBundle() argument
81 *meta_graph_def->mutable_graph_def() = graph_def; in AddGraphDefToSavedModelBundle()
82 return InitializeSavedModelBundleSession(graph_def, init_node, in AddGraphDefToSavedModelBundle()
89 const GraphDef& graph_def, const std::unordered_set<string>& outputs, in AddGraphDefWithOutputsToSavedModelBundle() argument
95 return AddGraphDefToSavedModelBundle(graph_def, init_node, in AddGraphDefWithOutputsToSavedModelBundle()
123 GraphDef graph_def; in TestFreezeGraphWithoutDependentVariables() local
140 TF_ASSERT_OK(scope.ToGraphDef(&graph_def)); in TestFreezeGraphWithoutDependentVariables()
143 graph_def, {"c:0"}, "assign", &saved_model_bundle)); in TestFreezeGraphWithoutDependentVariables()
[all …]
/external/tensorflow/tensorflow/cc/training/
Dqueue_runner_test.cc78 GraphDef graph_def; in BuildSimpleGraph() local
79 TF_EXPECT_OK(root.ToGraphDef(&graph_def)); in BuildSimpleGraph()
80 return graph_def; in BuildSimpleGraph()
102 const GraphDef& graph_def) { in BuildSessionAndInitVariable() argument
105 TF_CHECK_OK(session->Create(graph_def)); in BuildSessionAndInitVariable()
112 GraphDef graph_def = BuildSimpleGraph(); in TEST() local
113 auto session = BuildSessionAndInitVariable(graph_def); in TEST()
130 GraphDef graph_def = BuildSimpleGraph(); in TEST() local
131 auto session = BuildSessionAndInitVariable(graph_def); in TEST()
150 GraphDef graph_def = BuildSimpleGraph(); in TEST() local
[all …]
/external/tensorflow/tensorflow/python/summary/writer/
Dwriter.py50 def __init__(self, event_writer, graph=None, graph_def=None): argument
82 if graph is not None or graph_def is not None:
84 self.add_graph(graph=graph, graph_def=graph_def)
90 meta_graph.create_meta_graph_def(graph_def=graph_def or
158 def _add_graph_def(self, graph_def, global_step=None): argument
159 graph_bytes = graph_def.SerializeToString()
160 event = event_pb2.Event(graph_def=graph_bytes)
163 def add_graph(self, graph, global_step=None, graph_def=None): argument
179 if graph is not None and graph_def is not None:
183 if isinstance(graph, ops.Graph) or isinstance(graph_def, ops.Graph):
[all …]
/external/tensorflow/tensorflow/python/framework/
Dimporter.py86 def _ProcessGraphDefParam(graph_def): argument
88 if not isinstance(graph_def, graph_pb2.GraphDef):
92 old_graph_def = graph_def
93 graph_def = graph_pb2.GraphDef()
94 graph_def.MergeFrom(old_graph_def)
105 for node in graph_def.node:
113 return graph_def
145 def _RemoveDefaultAttrs(producer_op_list, graph_def): argument
156 for node in graph_def.node:
351 def import_graph_def(graph_def, argument
[all …]
Dmeta_graph.py118 graph_def = graph_pb2.GraphDef()
124 graph_def.ParseFromString(file_content)
125 return graph_def
131 text_format.Merge(file_content, graph_def)
135 return graph_def
138 def ops_used_by_graph_def(graph_def): argument
151 for fun in graph_def.library.function:
169 for node in graph_def.node:
179 def stripped_op_list_for_graph(graph_def): argument
196 used_ops = ops_used_by_graph_def(graph_def)
[all …]
/external/tensorflow/tensorflow/core/common_runtime/
Dplacer_inspection_required_ops_utils_test.cc37 void VerifyPlacerInspectionRequiredOps(const GraphDef& graph_def, in VerifyPlacerInspectionRequiredOps() argument
41 TF_ASSERT_OK(ConvertGraphDefToGraph(opts, graph_def, &graph)); in VerifyPlacerInspectionRequiredOps()
47 << " in the graph " << graph_def.DebugString(); in VerifyPlacerInspectionRequiredOps()
68 GraphDef graph_def = GDef( in TEST() local
80 VerifyPlacerInspectionRequiredOps(graph_def, in TEST()
95 GraphDef graph_def = GDef( in TEST() local
104 VerifyPlacerInspectionRequiredOps(graph_def, in TEST()
120 GraphDef graph_def = GDef( in TEST() local
132 VerifyPlacerInspectionRequiredOps(graph_def, in TEST()
/external/tensorflow/tensorflow/compiler/tf2xla/
Dtf2xla_test.cc43 GraphDef graph_def; in SumGraph() local
44 NodeDef* x = graph_def.add_node(); in SumGraph()
48 NodeDef* y = graph_def.add_node(); in SumGraph()
52 NodeDef* sum = graph_def.add_node(); in SumGraph()
58 return graph_def; in SumGraph()
70 GraphDef graph_def = SumGraph(); in TEST() local
75 TF_EXPECT_OK(ConvertGraphDefToXla(graph_def, config, client, &computation)); in TEST()
99 ConvertGraphDefToXla(graph_def, config, client, &computation))); in TEST()
103 GraphDef graph_def = SumGraph(); in TEST() local
105 NodeDef* unused = graph_def.add_node(); in TEST()
[all …]

12345678910>>...13