/external/tensorflow/tensorflow/cc/saved_model/ |
D | reader_test.cc | 46 void CheckMetaGraphDef(const MetaGraphDef& meta_graph_def) { in CheckMetaGraphDef() argument 47 const auto& tags = meta_graph_def.meta_info_def().tags(); in CheckMetaGraphDef() 50 EXPECT_NE(meta_graph_def.meta_info_def().tensorflow_version(), ""); in CheckMetaGraphDef() 52 meta_graph_def.signature_def().at("serving_default").method_name(), in CheckMetaGraphDef() 58 MetaGraphDef meta_graph_def; in TEST_F() local 62 &meta_graph_def)); in TEST_F() 63 CheckMetaGraphDef(meta_graph_def); in TEST_F() 67 MetaGraphDef meta_graph_def; in TEST_F() local 71 &meta_graph_def); in TEST_F() 80 MetaGraphDef meta_graph_def; in TEST_F() local [all …]
|
D | loader_util.cc | 31 Status GetInitOp(const string& export_dir, const MetaGraphDef& meta_graph_def, in GetInitOp() argument 33 const auto& sig_def_map = meta_graph_def.signature_def(); in GetInitOp() 35 meta_graph_def.signature_def().find(kSavedModelInitOpSignatureKey); in GetInitOp() 48 const auto& collection_def_map = meta_graph_def.collection_def(); in GetInitOp() 68 Status GetAssetFileDefs(const MetaGraphDef& meta_graph_def, in GetAssetFileDefs() argument 72 if (meta_graph_def.asset_file_def_size() > 0) { in GetAssetFileDefs() 73 for (const auto& asset : meta_graph_def.asset_file_def()) { in GetAssetFileDefs() 79 const auto& collection_def_map = meta_graph_def.collection_def(); in GetAssetFileDefs()
|
D | reader.cc | 88 MetaGraphDef* meta_graph_def) { in FindMetaGraphDef() argument 99 *meta_graph_def = std::move(graph_def); in FindMetaGraphDef() 102 TF_RETURN_IF_ERROR(ByteSwapTensorContent(meta_graph_def)); in FindMetaGraphDef() 119 MetaGraphDef* const meta_graph_def) { in ReadMetaGraphDefFromSavedModel() argument 123 FindMetaGraphDef(tags, &saved_model_proto, meta_graph_def)); in ReadMetaGraphDefFromSavedModel()
|
D | loader_util.h | 30 Status GetInitOp(const string& export_dir, const MetaGraphDef& meta_graph_def, 33 Status GetAssetFileDefs(const MetaGraphDef& meta_graph_def,
|
D | bundle_v2.h | 47 MetaGraphDef& meta_graph_def() { return meta_graph_def_; } in meta_graph_def() function 51 return meta_graph_def().object_graph_def(); in saved_object_graph()
|
/external/tensorflow/tensorflow/python/saved_model/ |
D | loader_impl.py | 193 def _get_op_from_collection(meta_graph_def, op_key): argument 194 return _get_main_op_tensor(meta_graph_def, op_key) 197 def _get_op_from_signature_def(meta_graph_def, op_signature_key, import_scope): argument 199 if op_signature_key in meta_graph_def.signature_def: 201 meta_graph_def.signature_def[op_signature_key], op_signature_key, 207 def get_init_op(meta_graph_def, import_scope=None): argument 209 meta_graph_def, constants.INIT_OP_SIGNATURE_KEY, import_scope) or 210 _get_op_from_collection(meta_graph_def, constants.MAIN_OP_KEY) or 211 _get_op_from_collection(meta_graph_def, constants.LEGACY_INIT_OP_KEY)) 214 def get_train_op(meta_graph_def, import_scope=None): argument [all …]
|
D | load_v1_in_v2.py | 91 def load_graph(self, returns, meta_graph_def): argument 95 meta_graph_def) 137 def _extract_signatures(self, wrapped, meta_graph_def): argument 140 for signature_key, signature_def in meta_graph_def.signature_def.items(): 209 meta_graph_def = self.get_meta_graph_def_from_tags(tags) 212 meta_graph_def.graph_def.library, 216 meta_graph_def.graph_def.library.Clear() 218 meta_graph_def.graph_def.library.function.add().CopyFrom( 222 for node_def in meta_graph_def.graph_def.node: 228 functools.partial(self.load_graph, load_graph_returns, meta_graph_def), [all …]
|
D | builder_impl.py | 115 def _save_and_write_assets(self, meta_graph_def, assets_list=None): argument 123 write_fn = functools.partial(_add_asset_to_metagraph, meta_graph_def) 134 def _tag_and_add_meta_graph(self, meta_graph_def, tags, signature_def_map): argument 147 meta_graph_def.meta_info_def.tags.append(tag) 151 meta_graph_def.signature_def[key].CopyFrom(signature_def_map[key]) 154 proto_meta_graph_def.CopyFrom(meta_graph_def) 294 meta_graph_def = saver.export_meta_graph( 298 self._save_and_write_assets(meta_graph_def, assets_list) 301 self._tag_and_add_meta_graph(meta_graph_def, tags, signature_def_map) 383 meta_graph_def = saver.export_meta_graph( [all …]
|
D | save.py | 771 def _fill_meta_graph_def(meta_graph_def, saveable_view, signature_functions, argument 816 meta_graph_def.collection_def[constants.MAIN_OP_KEY].node_list.value.append( 818 meta_graph_def.signature_def[constants.INIT_OP_SIGNATURE_KEY].CopyFrom( 848 meta_graph_def.saver_def.CopyFrom(saver_def) 858 meta_graph_def.graph_def.CopyFrom(graph_def) 859 meta_graph_def.meta_info_def.tags.append(tag_constants.SERVING) 860 meta_graph_def.meta_info_def.tensorflow_version = versions.__version__ 861 meta_graph_def.meta_info_def.tensorflow_git_version = ( 864 meta_graph_def.meta_info_def.stripped_default_attrs = True 865 meta_graph_def.meta_info_def.stripped_op_list.MergeFrom( [all …]
|
D | method_name_updater.py | 95 for meta_graph_def in self._saved_model.meta_graphs: 96 if tags is None or set(tags) == set(meta_graph_def.meta_info_def.tags): 97 if signature_key not in meta_graph_def.signature_def: 104 meta_graph_def.signature_def[signature_key].method_name = method_name
|
/external/tensorflow/tensorflow/python/framework/ |
D | meta_graph.py | 372 def add_collection_def(meta_graph_def, key, graph=None, argument 411 col_def = meta_graph_def.collection_def[key] 442 if key in meta_graph_def.collection_def: 443 del meta_graph_def.collection_def[key] 461 def strip_graph_default_valued_attrs(meta_graph_def): argument 475 for function_def in meta_graph_def.graph_def.library.function: 496 for node_def in meta_graph_def.graph_def.node: 500 for function_def in meta_graph_def.graph_def.library.function: 505 meta_graph_def.meta_info_def.stripped_default_attrs = True 565 meta_graph_def = meta_graph_pb2.MetaGraphDef() [all …]
|
D | meta_graph_test.py | 86 meta_graph_def, var_list = meta_graph.export_scoped_meta_graph( 91 self.assertTrue(meta_graph_def.HasField("meta_info_def")) 92 self.assertNotEqual(meta_graph_def.meta_info_def.tensorflow_version, "") 93 self.assertNotEqual(meta_graph_def.meta_info_def.tensorflow_git_version, 106 test_util.assert_meta_graph_protos_equal(self, meta_graph_def, 201 meta_graph_def, _ = meta_graph.export_scoped_meta_graph( 205 meta_graph_def.graph_def) 208 self.assertTrue(meta_graph_def.meta_info_def.stripped_default_attrs) 211 meta_graph_def, _ = meta_graph.export_scoped_meta_graph( 215 meta_graph_def.graph_def) [all …]
|
/external/tensorflow/tensorflow/core/tfrt/saved_model/ |
D | saved_model_import_input.cc | 26 const FallbackState& fallback_state, const MetaGraphDef* meta_graph_def, in Create() argument 29 DCHECK(meta_graph_def); in Create() 37 TfrtGraphExecutionState::Create(options, meta_graph_def->graph_def(), in Create() 40 return TfrtSavedModelMLIRImportInput(meta_graph_def, debug_info, in Create() 45 const MetaGraphDef* meta_graph_def, const GraphDebugInfo& debug_info, in TfrtSavedModelMLIRImportInput() argument 47 : SavedModelMLIRImportInput(meta_graph_def, debug_info), in TfrtSavedModelMLIRImportInput()
|
D | saved_model.cc | 266 const tensorflow::MetaGraphDef& meta_graph_def) { in FindNamesForValidSignatures() argument 277 for (const auto& iter : meta_graph_def.signature_def()) { in FindNamesForValidSignatures() 304 mlir::MLIRContext* context, const tensorflow::MetaGraphDef& meta_graph_def, in ImportSavedModel() argument 310 signature_names = FindNamesForValidSignatures(meta_graph_def); in ImportSavedModel() 324 fallback_state, &meta_graph_def, /*debug_info=*/{}, in ImportSavedModel() 439 tensorflow::MetaGraphDef meta_graph_def; in ReadSavedModel() local 441 std::string(saved_model_dir), tags, &meta_graph_def)); in ReadSavedModel() 449 return std::move(meta_graph_def); in ReadSavedModel() 483 auto meta_graph_def = ReadSavedModel(saved_model_dir, tags); in LoadSavedModel() local 484 if (!meta_graph_def.ok()) { in LoadSavedModel() [all …]
|
D | saved_model_import_input.h | 31 const FallbackState& fallback_state, const MetaGraphDef* meta_graph_def, 37 const MetaGraphDef* meta_graph_def, const GraphDebugInfo& debug_info,
|
/external/tensorflow/tensorflow/python/tools/ |
D | saved_model_cli.py | 95 def _get_inputs_tensor_info_from_meta_graph_def(meta_graph_def, argument 113 if signature_def_key not in meta_graph_def.signature_def: 117 return meta_graph_def.signature_def[signature_def_key].inputs 120 def _get_outputs_tensor_info_from_meta_graph_def(meta_graph_def, argument 135 return meta_graph_def.signature_def[signature_def_key].outputs 151 meta_graph_def = saved_model_utils.get_meta_graph_def(saved_model_dir, 154 meta_graph_def, signature_def_key) 156 meta_graph_def, signature_def_key) 174 meta_graph_def.signature_def[signature_def_key].method_name) 186 for meta_graph_def in meta_graphs: [all …]
|
D | saved_model_utils.py | 89 for meta_graph_def in saved_model.meta_graphs: 90 all_tags.append(list(meta_graph_def.meta_info_def.tags)) 118 for meta_graph_def in saved_model.meta_graphs: 119 meta_graph_tags = set(meta_graph_def.meta_info_def.tags) 121 return meta_graph_def
|
D | saved_model_aot_compile.py | 205 meta_graph_def: meta_graph_pb2.MetaGraphDef, 234 signature_def_map = meta_graph_def.signature_def 251 graph_writer.write(meta_graph_def.graph_def.SerializeToString()) 255 meta_graph_def.graph_def, signature_def) 257 graph_def = _optimize_graph(meta_graph_def, signature_def) 280 restorer = saver_lib.import_meta_graph(meta_graph_def, clear_devices=True) 312 meta_graph_def, 379 meta_graph_def=meta_graph_def, 413 def _optimize_graph(meta_graph_def, signature_def): argument 417 new_meta_graph_def = copy.deepcopy(meta_graph_def)
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/translate/ |
D | import_model.h | 94 const MetaGraphDef& meta_graph_def, const GraphDebugInfo& debug_info, 105 SavedModelMLIRImportInput(const MetaGraphDef* meta_graph_def, in SavedModelMLIRImportInput() argument 107 : meta_graph_def_(meta_graph_def), debug_info_(debug_info) { in SavedModelMLIRImportInput() 108 DCHECK(meta_graph_def); in SavedModelMLIRImportInput() 114 const MetaGraphDef& meta_graph_def() const { return *meta_graph_def_; } in meta_graph_def() function
|
/external/tensorflow/tensorflow/core/ir/importexport/ |
D | savedmodel_export.cc | 41 tensorflow::MetaGraphDef meta_graph_def = original_saved_model.meta_graphs(0); in ExportMlirToSavedModel() local 42 *(meta_graph_def.mutable_graph_def()) = std::move(new_graphdef); in ExportMlirToSavedModel() 44 *(output_saved_model->mutable_meta_graphs(0)) = std::move(meta_graph_def); in ExportMlirToSavedModel()
|
/external/tensorflow/tensorflow/compiler/tf2tensorrt/ |
D | trt_convert_api.cc | 64 Status RunGrappler(const MetaGraphDef& meta_graph_def, in RunGrappler() argument 79 grappler::GrapplerItemFromMetaGraphDef("tf_graph", meta_graph_def, in RunGrappler() 155 Status RunTfTrt(const MetaGraphDef& meta_graph_def, in RunTfTrt() argument 171 TF_RETURN_IF_ERROR(RunGrappler(meta_graph_def, input_names, output_names, in RunTfTrt() 429 Status InlineFunctions(const MetaGraphDef& meta_graph_def, in InlineFunctions() argument 439 TF_RETURN_IF_ERROR(RunGrappler(meta_graph_def, {}, {}, config_proto, nullptr, in InlineFunctions() 455 frozen_meta_graph->CopyFrom(bundle.meta_graph_def); in FreezeGraph() 486 InlineFunctions(bundle->meta_graph_def, &inlined_graph_def)); in ConvertAndBuild() 490 bundle->meta_graph_def.mutable_graph_def()->CopyFrom(inlined_graph_def); in ConvertAndBuild()
|
D | trt_convert_api_test.cc | 183 bundle->meta_graph_def = GetModel(); in GetSavedModelBundle() 186 TF_RETURN_IF_ERROR(session->Create(bundle->meta_graph_def.graph_def())); in GetSavedModelBundle() 250 MetaGraphDef meta_graph_def = GetModel(); in ConvertAndRunFrozenGraph() local 253 meta_graph_def.graph_def(), {"input"}, {"output"}, input_tensors_, in ConvertAndRunFrozenGraph() 263 TF_EXPECT_OK(session->Create(meta_graph_def.graph_def())); in ConvertAndRunFrozenGraph()
|
/external/tensorflow/tensorflow/python/summary/writer/ |
D | writer.py | 225 def add_meta_graph(self, meta_graph_def, global_step=None): argument 240 if not isinstance(meta_graph_def, meta_graph_pb2.MetaGraphDef): 242 type(meta_graph_def)) 243 meta_graph_bytes = meta_graph_def.SerializeToString() 244 event = event_pb2.Event(meta_graph_def=meta_graph_bytes)
|
/external/tensorflow/tensorflow/python/training/ |
D | supervisor_test.py | 183 self.assertTrue(ev.meta_graph_def) 232 self.assertTrue(ev.meta_graph_def) 346 meta_graph_def = meta_graph.create_meta_graph_def() 369 ev_meta_graph.ParseFromString(ev.meta_graph_def) 370 self.assertProtoEquals(meta_graph_def, ev_meta_graph) 445 meta_graph_def = meta_graph.create_meta_graph_def() 469 ev_meta_graph.ParseFromString(ev.meta_graph_def) 470 self.assertProtoEquals(meta_graph_def, ev_meta_graph) 767 meta_graph_def = meta_graph.create_meta_graph_def( 789 ev_meta_graph.ParseFromString(ev.meta_graph_def) [all …]
|
D | saver.py | 1458 def _add_collection_def(meta_graph_def, key, export_scope=None): argument 1467 meta_graph_def, key, export_scope=export_scope) 1596 meta_graph_def = meta_graph.read_meta_graph_file(meta_graph_or_file) 1598 meta_graph_def = meta_graph_or_file 1602 meta_graph_def, 1608 saver = _create_saver_from_imported_meta_graph(meta_graph_def, import_scope, 1613 def _create_saver_from_imported_meta_graph(meta_graph_def, import_scope, argument 1616 if meta_graph_def.HasField("saver_def"): 1625 return Saver(saver_def=meta_graph_def.saver_def, name=scope) 1706 meta_graph_def, _ = meta_graph.export_scoped_meta_graph( [all …]
|