Home
last modified time | relevance | path

Searched refs:meta_graph_def (Results 1 – 25 of 39) sorted by relevance

12

/external/tensorflow/tensorflow/cc/saved_model/
Dreader_test.cc38 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 …]
Dloader.cc68 Status LoadMetaGraphIntoSession(const MetaGraphDef& meta_graph_def, in LoadMetaGraphIntoSession() argument
74 return (*session)->Create(meta_graph_def.graph_def()); in LoadMetaGraphIntoSession()
148 const MetaGraphDef& meta_graph_def, in RunInitOp() argument
166 Status GetInitOp(const string& export_dir, const MetaGraphDef& meta_graph_def, in GetInitOp() argument
168 const auto& sig_def_map = meta_graph_def.signature_def(); in GetInitOp()
170 meta_graph_def.signature_def().find(kSavedModelInitOpSignatureKey); in GetInitOp()
178 const auto& collection_def_map = meta_graph_def.collection_def(); in GetInitOp()
235 Status GetAssetFileDefs(const MetaGraphDef& meta_graph_def, in GetAssetFileDefs() argument
239 if (meta_graph_def.asset_file_def_size() > 0) { in GetAssetFileDefs()
240 for (const auto& asset : meta_graph_def.asset_file_def()) { in GetAssetFileDefs()
[all …]
Dreader.cc53 MetaGraphDef* meta_graph_def) { in FindMetaGraphDef() argument
64 *meta_graph_def = std::move(graph_def); in FindMetaGraphDef()
81 MetaGraphDef* const meta_graph_def) { in ReadMetaGraphDefFromSavedModel() argument
85 FindMetaGraphDef(tags, &saved_model_proto, meta_graph_def)); in ReadMetaGraphDefFromSavedModel()
Dbundle_v2.h47 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()
Dloader.h62 return meta_graph_def.signature_def(); in GetSignatures()
66 MetaGraphDef meta_graph_def; member
Dreader.h35 MetaGraphDef* const meta_graph_def);
/external/tensorflow/tensorflow/python/saved_model/
Dloader_impl.py193 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 …]
Dload_v1_in_v2.py86 def load_graph(self, returns, meta_graph_def): argument
90 meta_graph_def)
131 def _extract_signatures(self, wrapped, meta_graph_def): argument
134 for signature_key, signature_def in meta_graph_def.signature_def.items():
188 meta_graph_def = self.get_meta_graph_def_from_tags(tags)
191 meta_graph_def.graph_def.library,
195 meta_graph_def.graph_def.library.Clear()
197 meta_graph_def.graph_def.library.function.add().CopyFrom(
201 for node_def in meta_graph_def.graph_def.node:
208 functools.partial(self.load_graph, load_graph_returns, meta_graph_def),
[all …]
Dbuilder_impl.py114 def _save_and_write_assets(self, meta_graph_def, assets_list=None): argument
122 write_fn = functools.partial(_add_asset_to_metagraph, meta_graph_def)
133 def _tag_and_add_meta_graph(self, meta_graph_def, tags, signature_def_map): argument
146 meta_graph_def.meta_info_def.tags.append(tag)
150 meta_graph_def.signature_def[key].CopyFrom(signature_def_map[key])
153 proto_meta_graph_def.CopyFrom(meta_graph_def)
293 meta_graph_def = saver.export_meta_graph(
297 self._save_and_write_assets(meta_graph_def, assets_list)
300 self._tag_and_add_meta_graph(meta_graph_def, tags, signature_def_map)
382 meta_graph_def = saver.export_meta_graph(
[all …]
Dsave.py569 def _fill_meta_graph_def(meta_graph_def, saveable_view, signature_functions, argument
611 meta_graph_def.collection_def[constants.MAIN_OP_KEY].node_list.value.append(
613 meta_graph_def.signature_def[constants.INIT_OP_SIGNATURE_KEY].CopyFrom(
630 meta_graph_def.saver_def.CopyFrom(saver_def)
634 meta_graph_def.graph_def.CopyFrom(graph_def)
635 meta_graph_def.meta_info_def.tags.append(tag_constants.SERVING)
636 meta_graph_def.meta_info_def.tensorflow_version = versions.__version__
637 meta_graph_def.meta_info_def.tensorflow_git_version = (
640 meta_graph_def.meta_info_def.stripped_default_attrs = True
641 meta_graph_def.meta_info_def.stripped_op_list.MergeFrom(
[all …]
Dmethod_name_updater.py100 for meta_graph_def in self._saved_model.meta_graphs:
101 if tags is None or set(tags) == set(meta_graph_def.meta_info_def.tags):
102 if signature_key not in meta_graph_def.signature_def:
109 meta_graph_def.signature_def[signature_key].method_name = method_name
Dload.py587 meta_graph_def = saved_model_proto.meta_graphs[0]
589 and set(tags) != set(meta_graph_def.meta_info_def.tags)):
594 .format(export_dir, meta_graph_def.meta_info_def.tags, tags))
595 object_graph_proto = meta_graph_def.object_graph_def
603 root.tensorflow_version = meta_graph_def.meta_info_def.tensorflow_version
605 meta_graph_def.meta_info_def.tensorflow_git_version)
Dsaved_model_test.py895 meta_graph_def = loader.load(sess, ["foo"], export_dir)
899 loader_impl.get_train_op(meta_graph_def), ops.Tensor)
923 meta_graph_def = loader.load(sess, ["foo"], export_dir)
927 loader_impl.get_train_op(meta_graph_def), ops.Operation)
952 meta_graph_def = loader.load(sess, ["foo"], export_dir)
954 loader_impl.get_train_op(meta_graph_def), ops.Tensor)
1468 meta_graph_def = loader.load(sess, ["foo"], export_dir)
1470 meta_graph_def.graph_def)
1480 for meta_graph_def in saved_model_pb.meta_graphs:
1481 if set(meta_graph_def.meta_info_def.tags) == set(["foo"]):
[all …]
/external/tensorflow/tensorflow/python/framework/
Dmeta_graph.py369 def add_collection_def(meta_graph_def, key, graph=None, argument
407 col_def = meta_graph_def.collection_def[key]
438 if key in meta_graph_def.collection_def:
439 del meta_graph_def.collection_def[key]
457 def strip_graph_default_valued_attrs(meta_graph_def): argument
471 for function_def in meta_graph_def.graph_def.library.function:
492 for node_def in meta_graph_def.graph_def.node:
496 for function_def in meta_graph_def.graph_def.library.function:
501 meta_graph_def.meta_info_def.stripped_default_attrs = True
557 meta_graph_def = meta_graph_pb2.MetaGraphDef()
[all …]
Dmeta_graph_test.py90 meta_graph_def, var_list = meta_graph.export_scoped_meta_graph(
95 self.assertTrue(meta_graph_def.HasField("meta_info_def"))
96 self.assertNotEqual(meta_graph_def.meta_info_def.tensorflow_version, "")
97 self.assertNotEqual(meta_graph_def.meta_info_def.tensorflow_git_version,
110 test_util.assert_meta_graph_protos_equal(self, meta_graph_def,
182 meta_graph_def, _ = meta_graph.export_scoped_meta_graph(
186 meta_graph_def.graph_def)
189 self.assertTrue(meta_graph_def.meta_info_def.stripped_default_attrs)
192 meta_graph_def, _ = meta_graph.export_scoped_meta_graph(
196 meta_graph_def.graph_def)
[all …]
/external/tensorflow/tensorflow/python/tools/
Dsaved_model_utils.py91 for meta_graph_def in saved_model.meta_graphs:
92 all_tags.append(list(meta_graph_def.meta_info_def.tags))
118 for meta_graph_def in saved_model.meta_graphs:
119 if set(meta_graph_def.meta_info_def.tags) == set_of_tags:
120 return meta_graph_def
Dsaved_model_cli.py241 def _get_inputs_tensor_info_from_meta_graph_def(meta_graph_def, argument
256 return meta_graph_def.signature_def[signature_def_key].inputs
259 def _get_outputs_tensor_info_from_meta_graph_def(meta_graph_def, argument
274 return meta_graph_def.signature_def[signature_def_key].outputs
290 meta_graph_def = saved_model_utils.get_meta_graph_def(saved_model_dir,
293 meta_graph_def, signature_def_key)
295 meta_graph_def, signature_def_key)
313 meta_graph_def.signature_def[signature_def_key].method_name)
325 for meta_graph_def in meta_graphs:
326 has_object_graph_def |= meta_graph_def.HasField('object_graph_def')
[all …]
/external/tensorflow/tensorflow/python/summary/writer/
Dwriter.py229 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)
Dfake_summary_writer.py120 def add_meta_graph(self, meta_graph_def, global_step=None): argument
124 self._added_meta_graphs.append(meta_graph_def)
/external/tensorflow/tensorflow/core/kernels/data/
Drewrite_utils.cc105 MetaGraphDef meta_graph_def; in ApplyRewrites() local
106 (*meta_graph_def.mutable_graph_def()) = *graph_def; in ApplyRewrites()
112 (*meta_graph_def.mutable_collection_def())["train_op"] = collection_def; in ApplyRewrites()
119 "graph", meta_graph_def, item_config); in ApplyRewrites()
/external/tensorflow/tensorflow/python/training/
Dsupervisor_test.py188 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 …]
Dsaver.py1329 def _add_collection_def(meta_graph_def, key, export_scope=None): argument
1338 meta_graph_def, key, export_scope=export_scope)
1467 meta_graph_def = meta_graph.read_meta_graph_file(meta_graph_or_file)
1469 meta_graph_def = meta_graph_or_file
1473 meta_graph_def,
1479 saver = _create_saver_from_imported_meta_graph(meta_graph_def, import_scope,
1484 def _create_saver_from_imported_meta_graph(meta_graph_def, import_scope, argument
1487 if meta_graph_def.HasField("saver_def"):
1496 return Saver(saver_def=meta_graph_def.saver_def, name=scope)
1576 meta_graph_def, _ = meta_graph.export_scoped_meta_graph(
[all …]
Dsaver_test.py1851 meta_graph_def = save.export_meta_graph(filename)
1852 self.assertTrue(meta_graph_def.HasField("saver_def"))
1853 self.assertTrue(meta_graph_def.HasField("graph_def"))
1854 self.assertTrue(meta_graph_def.HasField("meta_info_def"))
1855 self.assertNotEqual(meta_graph_def.meta_info_def.tensorflow_version, "")
1856 self.assertNotEqual(meta_graph_def.meta_info_def.tensorflow_git_version,
1858 collection_def = meta_graph_def.collection_def
1869 self, meta_graph_def, new_meta_graph_def)
1878 meta_graph_def = meta_graph_pb2.MetaGraphDef()
1882 save._add_collection_def(meta_graph_def, save)
[all …]
/external/tensorflow/tensorflow/cc/tools/
Dfreeze_saved_model_test.cc55 MetaGraphDef* meta_graph_def = &saved_model_bundle->meta_graph_def; in AddSignatureDefToSavedModelBundle() local
56 (*meta_graph_def->mutable_signature_def())[key] = signature_def; in AddSignatureDefToSavedModelBundle()
80 MetaGraphDef* meta_graph_def = &saved_model_bundle->meta_graph_def; in AddGraphDefToSavedModelBundle() local
81 *meta_graph_def->mutable_graph_def() = graph_def; in AddGraphDefToSavedModelBundle()
/external/tensorflow/tensorflow/python/keras/saving/
Dsaved_model_experimental_test.py283 meta_graph_def = loader_impl.load(sess, tags, path)
286 for k, v in meta_graph_def.signature_def[sig_def_key].inputs.items()}
289 for k, v in meta_graph_def.signature_def[sig_def_key].outputs.items()}
290 return inputs, outputs, meta_graph_def
408 inputs, outputs, meta_graph_def = load_model(
418 train_op = loader_impl.get_train_op(meta_graph_def)

12