/external/tensorflow/tensorflow/contrib/session_bundle/ |
D | bundle_shim_test.cc | 76 const MetaGraphDef meta_graph_def = saved_model_bundle.meta_graph_def; in LoadAndValidateSavedModelBundle() local 77 const auto& signature_def_map = meta_graph_def.signature_def(); in LoadAndValidateSavedModelBundle() 104 void ValidateSignatureDef(const MetaGraphDef& meta_graph_def, const string& key, in ValidateSignatureDef() argument 109 auto iter = meta_graph_def.signature_def().find(key); in ValidateSignatureDef() 110 ASSERT_TRUE(iter != meta_graph_def.signature_def().end()); in ValidateSignatureDef() 148 MetaGraphDef meta_graph_def; in TEST() local 150 TF_EXPECT_OK(ConvertSignaturesToSignatureDefs(&meta_graph_def)); in TEST() 151 EXPECT_EQ(0, meta_graph_def.signature_def_size()); in TEST() 159 MetaGraphDef meta_graph_def; in TEST() local 160 (*meta_graph_def.mutable_collection_def())[kSignaturesKey] in TEST() [all …]
|
D | signature_test.cc | 44 tensorflow::MetaGraphDef meta_graph_def; in TEST() local 50 (*meta_graph_def.mutable_collection_def())[kSignaturesKey] in TEST() 56 const Status status = GetClassificationSignature(meta_graph_def, &signature); in TEST() 62 tensorflow::MetaGraphDef meta_graph_def; in TEST() local 65 (*meta_graph_def.mutable_collection_def())[kSignaturesKey] in TEST() 71 const Status status = GetClassificationSignature(meta_graph_def, &signature); in TEST() 79 tensorflow::MetaGraphDef meta_graph_def; in TEST() local 82 (*meta_graph_def.mutable_collection_def())[kSignaturesKey] in TEST() 88 const Status status = GetClassificationSignature(meta_graph_def, &signature); in TEST() 96 tensorflow::MetaGraphDef meta_graph_def; in TEST() local [all …]
|
D | bundle_shim.cc | 82 MetaGraphDef* meta_graph_def) { in MaybeBuildPredictSignatureDef() argument 86 if (!GetNamedSignature(kPredictInputs, *meta_graph_def, &input_signature) in MaybeBuildPredictSignatureDef() 88 !GetNamedSignature(kPredictOutputs, *meta_graph_def, &output_signature) in MaybeBuildPredictSignatureDef() 120 meta_graph_def->signature_def().find(kDefaultServingSignatureDefKey) != in MaybeBuildPredictSignatureDef() 121 meta_graph_def->signature_def().end(); in MaybeBuildPredictSignatureDef() 126 (*meta_graph_def->mutable_signature_def())[signature_def_key] = signature_def; in MaybeBuildPredictSignatureDef() 163 MetaGraphDef* meta_graph_def) { in ConvertDefaultSignatureToSignatureDef() argument 168 meta_graph_def->signature_def().find(kDefaultServingSignatureDefKey) != in ConvertDefaultSignatureToSignatureDef() 169 meta_graph_def->signature_def().end(); in ConvertDefaultSignatureToSignatureDef() 178 (*meta_graph_def->mutable_signature_def())[kDefaultServingSignatureDefKey] = in ConvertDefaultSignatureToSignatureDef() [all …]
|
D | signature.cc | 49 Status GetSignatures(const tensorflow::MetaGraphDef& meta_graph_def, in GetSignatures() argument 51 const auto& collection_def = meta_graph_def.collection_def(); in GetSignatures() 56 DebugStringIfAvailable(meta_graph_def))); in GetSignatures() 63 tensorflow::MetaGraphDef* meta_graph_def) { in SetSignatures() argument 64 auto& collection_def = *(meta_graph_def->mutable_collection_def()); in SetSignatures() 77 const tensorflow::MetaGraphDef& meta_graph_def, in GetClassificationSignature() argument 80 TF_RETURN_IF_ERROR(GetSignatures(meta_graph_def, &signatures)); in GetClassificationSignature() 96 const string& name, const tensorflow::MetaGraphDef& meta_graph_def, in GetNamedClassificationSignature() argument 99 TF_RETURN_IF_ERROR(GetSignatures(meta_graph_def, &signatures)); in GetNamedClassificationSignature() 152 Status GetRegressionSignature(const tensorflow::MetaGraphDef& meta_graph_def, in GetRegressionSignature() argument [all …]
|
D | signature.h | 39 Status GetSignatures(const tensorflow::MetaGraphDef& meta_graph_def, 44 tensorflow::MetaGraphDef* meta_graph_def); 50 const tensorflow::MetaGraphDef& meta_graph_def, 57 const string& name, const tensorflow::MetaGraphDef& meta_graph_def, 63 Status GetRegressionSignature(const tensorflow::MetaGraphDef& meta_graph_def, 89 const tensorflow::MetaGraphDef& meta_graph_def, 93 Status GetDefaultSignature(const tensorflow::MetaGraphDef& meta_graph_def, 99 const tensorflow::MetaGraphDef& meta_graph_def,
|
D | session_bundle.py | 59 meta_graph_def=None): argument 81 if not meta_graph_def: 88 meta_graph_def = meta_graph_pb2.MetaGraphDef() 89 meta_graph_def.ParseFromString( 130 collection_def = meta_graph_def.collection_def 137 meta_graph_def) 141 meta_graph_def.graph_def.CopyFrom(graph_def) 146 saver = saver_lib.import_meta_graph(meta_graph_def) 156 meta_graph_def) 173 return sess, meta_graph_def
|
D | session_bundle.cc | 66 MetaGraphDef* meta_graph_def) { in GetMetaGraphDefFromExport() argument 69 return ReadBinaryProto(Env::Default(), meta_graph_def_path, meta_graph_def); in GetMetaGraphDefFromExport() 165 GetMetaGraphDefFromExport(export_dir, &(bundle->meta_graph_def))); in LoadSessionBundleFromPathUsingRunOptionsInternal() 171 AddDefaultAttrsToGraphDef(bundle->meta_graph_def.mutable_graph_def(), in LoadSessionBundleFromPathUsingRunOptionsInternal() 174 const auto& collection_def_map = bundle->meta_graph_def.collection_def(); in LoadSessionBundleFromPathUsingRunOptionsInternal() 175 const auto graph_it = bundle->meta_graph_def.collection_def().find(kGraphKey); in LoadSessionBundleFromPathUsingRunOptionsInternal() 190 const GraphDef& graph_def = bundle->meta_graph_def.graph_def(); in LoadSessionBundleFromPathUsingRunOptionsInternal() 209 bundle->meta_graph_def.saver_def().restore_op_name(), in LoadSessionBundleFromPathUsingRunOptionsInternal() 210 bundle->meta_graph_def.saver_def().filename_tensor_name(), in LoadSessionBundleFromPathUsingRunOptionsInternal()
|
D | session_bundle_test.py | 91 sess, meta_graph_def = session_bundle.load_session_bundle_from_path( 105 collection_def = meta_graph_def.collection_def 129 sess, meta_graph_def = session_bundle.load_session_bundle_from_path( 143 collection_def = meta_graph_def.collection_def
|
/external/tensorflow/tensorflow/cc/saved_model/ |
D | reader_test.cc | 38 void CheckMetaGraphDef(const MetaGraphDef& meta_graph_def) { in CheckMetaGraphDef() argument 39 const auto& tags = meta_graph_def.meta_info_def().tags(); in CheckMetaGraphDef() 42 EXPECT_NE(meta_graph_def.meta_info_def().tensorflow_version(), ""); in CheckMetaGraphDef() 44 meta_graph_def.signature_def().at("serving_default").method_name(), in CheckMetaGraphDef() 50 MetaGraphDef meta_graph_def; in TEST_F() local 55 &meta_graph_def)); in TEST_F() 56 CheckMetaGraphDef(meta_graph_def); in TEST_F() 60 MetaGraphDef meta_graph_def; in TEST_F() local 65 &meta_graph_def); in TEST_F() 74 MetaGraphDef meta_graph_def; in TEST_F() local [all …]
|
D | loader.cc | 67 Status LoadMetaGraphIntoSession(const MetaGraphDef& meta_graph_def, in LoadMetaGraphIntoSession() argument 73 return (*session)->Create(meta_graph_def.graph_def()); in LoadMetaGraphIntoSession() 147 const MetaGraphDef& meta_graph_def, in RunInitOp() argument 164 Status GetInitOp(const string& export_dir, const MetaGraphDef& meta_graph_def, in GetInitOp() argument 166 const auto& sig_def_map = meta_graph_def.signature_def(); in GetInitOp() 168 meta_graph_def.signature_def().find(kSavedModelInitOpSignatureKey); in GetInitOp() 176 const auto& collection_def_map = meta_graph_def.collection_def(); in GetInitOp() 233 Status GetAssetFileDefs(const MetaGraphDef& meta_graph_def, in GetAssetFileDefs() argument 237 if (meta_graph_def.asset_file_def_size() > 0) { in GetAssetFileDefs() 238 for (const auto& asset : meta_graph_def.asset_file_def()) { in GetAssetFileDefs() [all …]
|
D | reader.cc | 53 MetaGraphDef* meta_graph_def) { in FindMetaGraphDef() argument 64 *meta_graph_def = graph_def; in FindMetaGraphDef() 81 MetaGraphDef* const meta_graph_def) { in ReadMetaGraphDefFromSavedModel() argument 84 TF_RETURN_IF_ERROR(FindMetaGraphDef(saved_model_proto, tags, meta_graph_def)); in ReadMetaGraphDefFromSavedModel()
|
/external/tensorflow/tensorflow/python/saved_model/ |
D | loader_impl.py | 163 def _get_op_from_collection(meta_graph_def, op_key): argument 164 return _get_main_op_tensor(meta_graph_def, op_key) 167 def _get_op_from_signature_def(meta_graph_def, op_signature_key, import_scope): argument 169 if op_signature_key in meta_graph_def.signature_def: 171 meta_graph_def.signature_def[op_signature_key], op_signature_key, 177 def get_init_op(meta_graph_def, import_scope=None): argument 179 meta_graph_def, constants.INIT_OP_SIGNATURE_KEY, import_scope) or 180 _get_op_from_collection(meta_graph_def, constants.MAIN_OP_KEY) or 181 _get_op_from_collection(meta_graph_def, constants.LEGACY_INIT_OP_KEY)) 184 def get_train_op(meta_graph_def, import_scope=None): argument [all …]
|
D | builder_impl.py | 113 def _save_and_write_assets(self, meta_graph_def, assets_list=None): argument 121 write_fn = functools.partial(_add_asset_to_metagraph, meta_graph_def) 132 def _tag_and_add_meta_graph(self, meta_graph_def, tags, signature_def_map): argument 145 meta_graph_def.meta_info_def.tags.append(tag) 149 meta_graph_def.signature_def[key].CopyFrom(signature_def_map[key]) 152 proto_meta_graph_def.CopyFrom(meta_graph_def) 289 meta_graph_def = saver.export_meta_graph( 293 self._save_and_write_assets(meta_graph_def, assets_list) 296 self._tag_and_add_meta_graph(meta_graph_def, tags, signature_def_map) 378 meta_graph_def = saver.export_meta_graph( [all …]
|
D | load_v1_in_v2.py | 79 def load_graph(self, returns, meta_graph_def): argument 83 meta_graph_def) 97 def _extract_signatures(self, wrapped, meta_graph_def): argument 100 for signature_key, signature_def in meta_graph_def.signature_def.items(): 122 meta_graph_def = self.get_meta_graph_def_from_tags(tags) 125 functools.partial(self.load_graph, load_graph_returns, meta_graph_def), 130 init_op = loader_impl.get_init_op(meta_graph_def) 136 self._export_dir, meta_graph_def).items(): 148 signature_functions = self._extract_signatures(wrapped, meta_graph_def)
|
D | save.py | 475 def _fill_meta_graph_def(meta_graph_def, saveable_view, signature_functions): argument 514 meta_graph_def.collection_def[constants.MAIN_OP_KEY].node_list.value.append( 516 meta_graph_def.signature_def[constants.INIT_OP_SIGNATURE_KEY].CopyFrom( 533 meta_graph_def.saver_def.CopyFrom(saver_def) 536 meta_graph_def.graph_def.CopyFrom(graph_def) 537 meta_graph_def.meta_info_def.tags.append(tag_constants.SERVING) 538 meta_graph_def.asset_file_def.extend(asset_info.asset_defs) 540 meta_graph_def.signature_def[signature_key].CopyFrom(signature) 541 meta_graph.strip_graph_default_valued_attrs(meta_graph_def) 795 meta_graph_def = saved_model.meta_graphs.add() [all …]
|
/external/tensorflow/tensorflow/contrib/meta_graph_transform/ |
D | meta_graph_transform.py | 463 def _add_pruned_collection(base_meta_graph_def, meta_graph_def, argument 468 collection = meta_graph_def.collection_def[collection_name] 494 def _add_pruned_saver(base_meta_graph_def, meta_graph_def, removed_op_names): argument 550 meta_graph_def.saver_def.CopyFrom(base_meta_graph_def.saver_def) 561 def _add_pruned_signature(base_meta_graph_def, meta_graph_def, argument 583 meta_graph_def.signature_def[signature_name].CopyFrom(base_signature) 589 def _get_single_node_name_from_collection(meta_graph_def, collection_key): argument 591 if collection_key not in meta_graph_def.collection_def: 593 collection = meta_graph_def.collection_def[collection_key] 605 def _get_all_node_names_from_collection(meta_graph_def, collection_key): argument [all …]
|
D | meta_graph_transform_test.py | 346 meta_graph_def = meta_graph_pb2.MetaGraphDef() 351 meta_graph_def.collection_def[ 358 meta_graph_transform._add_new_inits_to_collection(meta_graph_def, 361 self.assertEqual(meta_graph_def.collection_def[ 456 meta_graph_def = meta_graph_pb2.MetaGraphDef() 459 base_meta_graph_def, meta_graph_def, collection_name, removed_op_names) 461 collection = meta_graph_def.collection_def[collection_name] 472 meta_graph_def = meta_graph_pb2.MetaGraphDef() 475 base_meta_graph_def, meta_graph_def, collection_name, removed_op_names) 477 collection = meta_graph_def.collection_def[collection_name] [all …]
|
/external/tensorflow/tensorflow/python/framework/ |
D | meta_graph.py | 379 def add_collection_def(meta_graph_def, key, graph=None, argument 417 col_def = meta_graph_def.collection_def[key] 448 if key in meta_graph_def.collection_def: 449 del meta_graph_def.collection_def[key] 467 def strip_graph_default_valued_attrs(meta_graph_def): argument 481 for function_def in meta_graph_def.graph_def.library.function: 502 for node_def in meta_graph_def.graph_def.node: 506 for function_def in meta_graph_def.graph_def.library.function: 511 meta_graph_def.meta_info_def.stripped_default_attrs = True 614 meta_graph_def = meta_graph_pb2.MetaGraphDef() [all …]
|
D | meta_graph_test.py | 89 meta_graph_def, var_list = meta_graph.export_scoped_meta_graph( 94 self.assertTrue(meta_graph_def.HasField("meta_info_def")) 95 self.assertNotEqual(meta_graph_def.meta_info_def.tensorflow_version, "") 96 self.assertNotEqual(meta_graph_def.meta_info_def.tensorflow_git_version, 109 test_util.assert_meta_graph_protos_equal(self, meta_graph_def, 181 meta_graph_def, _ = meta_graph.export_scoped_meta_graph( 185 meta_graph_def.graph_def) 188 self.assertTrue(meta_graph_def.meta_info_def.stripped_default_attrs) 191 meta_graph_def, _ = meta_graph.export_scoped_meta_graph( 195 meta_graph_def.graph_def) [all …]
|
/external/tensorflow/tensorflow/python/tools/ |
D | saved_model_cli.py | 83 def _get_inputs_tensor_info_from_meta_graph_def(meta_graph_def, argument 98 return meta_graph_def.signature_def[signature_def_key].inputs 101 def _get_outputs_tensor_info_from_meta_graph_def(meta_graph_def, argument 116 return meta_graph_def.signature_def[signature_def_key].outputs 132 meta_graph_def = saved_model_utils.get_meta_graph_def(saved_model_dir, 135 meta_graph_def, signature_def_key) 137 meta_graph_def, signature_def_key) 155 meta_graph_def.signature_def[signature_def_key].method_name) 246 def scan_meta_graph_def(meta_graph_def): argument 256 meta_graph_lib.ops_used_by_graph_def(meta_graph_def.graph_def)) [all …]
|
D | saved_model_utils.py | 90 for meta_graph_def in saved_model.meta_graphs: 91 all_tags.append(list(meta_graph_def.meta_info_def.tags)) 115 for meta_graph_def in saved_model.meta_graphs: 116 if set(meta_graph_def.meta_info_def.tags) == set_of_tags: 117 return meta_graph_def
|
/external/tensorflow/tensorflow/python/summary/writer/ |
D | writer.py | 229 def add_meta_graph(self, meta_graph_def, global_step=None): argument 244 if not isinstance(meta_graph_def, meta_graph_pb2.MetaGraphDef): 246 type(meta_graph_def)) 247 meta_graph_bytes = meta_graph_def.SerializeToString() 248 event = event_pb2.Event(meta_graph_def=meta_graph_bytes)
|
/external/tensorflow/tensorflow/contrib/predictor/ |
D | saved_model_predictor.py | 55 for meta_graph_def in saved_model.meta_graphs: 56 if set(meta_graph_def.meta_info_def.tags) == set_of_tags: 57 return meta_graph_def
|
/external/tensorflow/tensorflow/python/training/ |
D | supervisor_test.py | 188 self.assertTrue(ev.meta_graph_def) 237 self.assertTrue(ev.meta_graph_def) 351 meta_graph_def = meta_graph.create_meta_graph_def() 374 ev_meta_graph.ParseFromString(ev.meta_graph_def) 375 self.assertProtoEquals(meta_graph_def, ev_meta_graph) 450 meta_graph_def = meta_graph.create_meta_graph_def() 474 ev_meta_graph.ParseFromString(ev.meta_graph_def) 475 self.assertProtoEquals(meta_graph_def, ev_meta_graph) 774 meta_graph_def = meta_graph.create_meta_graph_def( 796 ev_meta_graph.ParseFromString(ev.meta_graph_def) [all …]
|
/external/tensorflow/tensorflow/contrib/saved_model/cc/saved_model/ |
D | signature_def_utils_test.cc | 69 const MetaGraphDef meta_graph_def = MakeSampleMetaGraphDef(); in TEST_F() local 73 FindSignatureDefByKey(meta_graph_def, kSignatureKey, &signature_def)); in TEST_F() 77 FindSignatureDefByKey(meta_graph_def, "nonexistent", &signature_def) in TEST_F()
|