/external/tensorflow/tensorflow/tools/graph_transforms/ |
D | sort_by_execution_order_test.cc | 33 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 …]
|
D | strip_unused_nodes_test.cc | 40 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 …]
|
D | remove_nodes_test.cc | 39 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 …]
|
D | sparsify_gather_test.cc | 42 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 …]
|
D | backports_test.cc | 43 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 …]
|
D | obfuscate_names_test.cc | 39 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 …]
|
D | set_device_test.cc | 38 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 …]
|
D | remove_device_test.cc | 39 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()
|
D | rename_op_test.cc | 39 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()
|
/external/tensorflow/tensorflow/core/graph/ |
D | validate_test.cc | 44 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/ |
D | graph_def_util_test.cc | 44 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 …]
|
D | graph_def_util.cc | 38 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 …]
|
D | graph_def_util.h | 32 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/ |
D | mutable_graph_view_test.cc | 145 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/ |
D | graph_utils_test.cc | 41 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/ |
D | rewrite_utils.cc | 82 bool optimize_function_library, GraphDef* graph_def, in ApplyRewrites() argument 87 NodeDef* node = graph_def->mutable_node()->Add(); in ApplyRewrites() 88 tensorflow::grappler::graph_utils::SetUniqueGraphNodeName("Sink", graph_def, in ApplyRewrites() 100 for (auto& function_def : *graph_def->mutable_library()->mutable_function()) { in ApplyRewrites() 106 (*meta_graph_def.mutable_graph_def()) = *graph_def; in ApplyRewrites() 129 *grappler_item, config, ctx->device(), &cluster, graph_def)); in ApplyRewrites() 135 for (auto& function_def : *graph_def->mutable_library()->mutable_function()) { in ApplyRewrites() 157 GraphDef graph_def; in RewriteDataset() local 159 AsGraphDef(ctx, input, std::move(serialization_ctx), &graph_def)); in RewriteDataset() 162 for (const auto& node : graph_def.node()) { in RewriteDataset() [all …]
|
/external/tensorflow/tensorflow/cc/tools/ |
D | freeze_saved_model_test.cc | 62 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/ |
D | queue_runner_test.cc | 78 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/core/lib/strings/ |
D | proto_serialization_test.cc | 31 GraphDef graph_def; in MakeGraphDef() local 33 NodeDef* node = graph_def.add_node(); in MakeGraphDef() 39 return graph_def; in MakeGraphDef() 45 GraphDef graph_def = MakeGraphDef(num_nodes); in BM_ProtoSerializationToString() local 50 SerializeToStringDeterministic(graph_def, &serialized)); in BM_ProtoSerializationToString() 58 GraphDef graph_def = MakeGraphDef(num_nodes); in BM_ProtoSerializationToBuffer() local 60 const size_t size = graph_def.ByteSizeLong(); in BM_ProtoSerializationToBuffer() 64 SerializeToBufferDeterministic(graph_def, buf.data(), size)); in BM_ProtoSerializationToBuffer() 72 GraphDef graph_def = MakeGraphDef(num_nodes); in BM_DeterministicProtoHash64() local 75 testing::DoNotOptimize(DeterministicProtoHash64(graph_def)); in BM_DeterministicProtoHash64()
|
/external/tensorflow/tensorflow/python/framework/ |
D | meta_graph.py | 118 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: 164 for node in graph_def.node: 174 def stripped_op_list_for_graph(graph_def): argument 191 used_ops = ops_used_by_graph_def(graph_def) [all …]
|
D | importer.py | 86 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 …]
|
D | graph_util_test.py | 176 graph_def = graph_pb2.GraphDef() 177 n1 = graph_def.node.add() 180 n2 = graph_def.node.add() 184 n3 = graph_def.node.add() 189 n4 = graph_def.node.add() 193 n5 = graph_def.node.add() 197 sub_graph = graph_util.extract_sub_graph(graph_def, ["n3"]) 204 graph_def = graph_pb2.GraphDef() 205 n1 = graph_def.node.add() 208 graph_util.extract_sub_graph(graph_def, "n1") [all …]
|
/external/tensorflow/tensorflow/python/summary/writer/ |
D | writer.py | 50 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/core/common_runtime/ |
D | placer_inspection_required_ops_utils_test.cc | 38 void VerifyPlacerInspectionRequiredOps(const GraphDef& graph_def, in VerifyPlacerInspectionRequiredOps() argument 42 TF_ASSERT_OK(ConvertGraphDefToGraph(opts, graph_def, &graph)); in VerifyPlacerInspectionRequiredOps() 48 << " in the graph " << graph_def.DebugString(); in VerifyPlacerInspectionRequiredOps() 69 GraphDef graph_def = GDef( in TEST() local 81 VerifyPlacerInspectionRequiredOps(graph_def, in TEST() 96 GraphDef graph_def = GDef( in TEST() local 105 VerifyPlacerInspectionRequiredOps(graph_def, in TEST() 121 GraphDef graph_def = GDef( in TEST() local 133 VerifyPlacerInspectionRequiredOps(graph_def, in TEST()
|
/external/tensorflow/tensorflow/lite/python/ |
D | util.py | 179 def run_graph_optimizations(graph_def, argument 196 meta_graph = _export_meta_graph(graph_def=graph_def, graph=graph) 221 def _convert_op_hints_if_present(sess, graph_def, output_tensors, argument 226 graph_def = tf_graph_util.convert_variables_to_constants( 227 sess, graph_def, output_arrays + hinted_outputs_nodes) 228 graph_def = convert_op_hints_to_stubs(graph_def=graph_def) 229 return graph_def 252 graph_def = _convert_to_constants.disable_lower_using_switch_merge( 253 sess.graph_def) 255 graph_def = run_graph_optimizations( [all …]
|