/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()
|
/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.cc | 37 string SummarizeGraphDef(const GraphDef& graph_def) { in SummarizeGraphDef() argument 40 &ret, "versions = ", ProtoShortDebugString(graph_def.versions()), ";\n"); in SummarizeGraphDef() 41 for (const NodeDef& node : graph_def.node()) { in SummarizeGraphDef() 47 Status ValidateExternalGraphDefSyntax(const GraphDef& graph_def) { in ValidateExternalGraphDefSyntax() argument 48 for (const NodeDef& node : graph_def.node()) { in ValidateExternalGraphDefSyntax() 54 Status AddDefaultAttrsToGraphDef(GraphDef* graph_def, in AddDefaultAttrsToGraphDef() argument 57 return AddDefaultAttrsToGraphDef(graph_def, op_registry, node_offset, false); in AddDefaultAttrsToGraphDef() 60 Status AddDefaultAttrsToGraphDef(GraphDef* graph_def, in AddDefaultAttrsToGraphDef() argument 63 if (node_offset > graph_def->node_size()) { in AddDefaultAttrsToGraphDef() 67 node_offset, " with total nodes in graph: ", graph_def->node_size()); in AddDefaultAttrsToGraphDef() [all …]
|
D | graph_def_util_test.cc | 46 GraphDef graph_def; in TEST() local 48 .Finalize(graph_def.add_node())); in TEST() 49 GraphDef expected_graph_def = graph_def; in TEST() 52 TF_ASSERT_OK(RemoveNewDefaultAttrsFromGraphDef(&graph_def, registry, registry, in TEST() 55 TF_EXPECT_GRAPH_EQ(expected_graph_def, graph_def); in TEST() 66 GraphDef graph_def; in TEST() local 69 .Finalize(graph_def.add_node())); in TEST() 70 GraphDef expected_graph_def = graph_def; in TEST() 73 TF_ASSERT_OK(RemoveNewDefaultAttrsFromGraphDef(&graph_def, registry, registry, in TEST() 76 TF_EXPECT_GRAPH_EQ(expected_graph_def, graph_def); in TEST() [all …]
|
D | graph_def_util.h | 30 string SummarizeGraphDef(const GraphDef& graph_def); 44 Status ValidateExternalGraphDefSyntax(const GraphDef& graph_def); 55 Status AddDefaultAttrsToGraphDef(GraphDef* graph_def, 61 Status AddDefaultAttrsToGraphDef(GraphDef* graph_def, 96 GraphDef* graph_def, const OpRegistryInterface& consumer_op_registry, 103 void OpsUsedByGraph(const GraphDef& graph_def, 115 Status StrippedOpListForGraph(const GraphDef& graph_def,
|
/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/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/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/python/framework/ |
D | meta_graph.py | 117 graph_def = graph_pb2.GraphDef() 123 graph_def.ParseFromString(file_content) 124 return graph_def 130 text_format.Merge(file_content, graph_def) 134 return graph_def 137 def ops_used_by_graph_def(graph_def): argument 150 for fun in graph_def.library.function: 163 for node in graph_def.node: 173 def stripped_op_list_for_graph(graph_def): argument 195 used_ops = ops_used_by_graph_def(graph_def) [all …]
|
D | graph_util_test.py | 167 graph_def = graph_pb2.GraphDef() 168 n1 = graph_def.node.add() 171 n2 = graph_def.node.add() 175 n3 = graph_def.node.add() 180 n4 = graph_def.node.add() 184 n5 = graph_def.node.add() 188 sub_graph = graph_util.extract_sub_graph(graph_def, ["n3"]) 195 graph_def = graph_pb2.GraphDef() 196 n1 = graph_def.node.add() 199 graph_util.extract_sub_graph(graph_def, "n1") [all …]
|
D | importer.py | 86 def _ProcessGraphDefParam(graph_def, op_dict): 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(op_dict, producer_op_list, graph_def): argument 157 for node in graph_def.node: 344 def import_graph_def(graph_def, argument [all …]
|
/external/tensorflow/tensorflow/contrib/meta_graph_transform/ |
D | meta_graph_transform.py | 74 def _gtt_transforms(graph_def, input_names, output_names, initializer_names, argument 93 transformed_graph_def.CopyFrom(graph_def) 99 return _graph_transforms.TransformGraph(graph_def, input_names, 103 def _freeze_transform(graph_def, output_names, initializer_names, saver_def, argument 128 graph_def = _freeze_graph_with_def_protos(graph_def, output_names, 144 return (graph_def, pruned_initializer_names) 147 def _clean_save_and_restore(graph_def, op, removed_op_names): argument 160 name_op = _find_op(graph_def, name) 161 shape_op = _find_op(graph_def, shape) 189 def _sparsify_gather_transform(graph_def, input_names, output_names, argument [all …]
|
D | meta_graph_transform_test.py | 72 expected_meta_graph_def.graph_def.ClearField('versions') 74 expected_meta_graph_def.graph_def.library.CopyFrom( 104 graph_def = graph_pb2.GraphDef() 105 graph_def.node.extend([node_def_pb2.NodeDef(name='z1', op='NoOp')]) 116 graph_def, input_names, output_names, initializer_names, transforms)) 120 graph_def, input_names, output_names + init_nodes, transforms) 124 graph_def = graph_pb2.GraphDef() 125 graph_def.node.extend([node_def_pb2.NodeDef(name='z1', op='NoOp')]) 137 graph_def.node.extend([node_def_pb2.NodeDef(name='n1', op='NoOp')]) 143 meta_graph_transform._freeze_transform(graph_def, output_names, [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/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/lite/python/ |
D | create_custom_op.py | 64 graph_def = graph_pb2.GraphDef() 66 graph_def.ParseFromString(f.read()) 67 return graph_def 70 def _write_graph_def(graph_def, filename): argument 75 f.write(graph_def.SerializeToString()) 78 def _collapse_subgraph(graph_def, inputs, outputs, op_definition): argument 84 graph_def=graph_def, 103 graph_def=graph, 107 _write_graph_def(graph_def=graph, filename=flags.FLAGS.output_graph)
|
/external/tensorflow/tensorflow/contrib/receptive_field/python/util/ |
D | receptive_field_test.py | 288 graph_def = create_test_network_1().as_graph_def() 294 graph_def, input_node, output_node)) 303 graph_def = create_test_network_2().as_graph_def() 309 graph_def, input_node, output_node)) 318 graph_def = create_test_network_3().as_graph_def() 323 graph_def, input_node, output_node) 326 graph_def = create_test_network_4().as_graph_def() 332 graph_def, input_node, output_node)) 341 graph_def = create_test_network_4().as_graph_def() 347 graph_def, input_node, output_node, input_resolution=[9, 9])) [all …]
|