Home
last modified time | relevance | path

Searched refs:signature_def (Results 1 – 25 of 58) sorted by relevance

123

/external/tensorflow/tensorflow/python/saved_model/
Dsignature_def_utils_impl.py52 signature_def = meta_graph_pb2.SignatureDef()
55 signature_def.inputs[item].CopyFrom(inputs[item])
58 signature_def.outputs[item].CopyFrom(outputs[item])
60 signature_def.method_name = method_name
61 return signature_def
105 signature_def = build_signature_def(
109 return signature_def
164 signature_def = build_signature_def(
168 return signature_def
205 signature_def = build_signature_def(
[all …]
Dsignature_def_utils_test.py78 signature_def = signature_def_utils_impl.build_signature_def(
80 self.assertEqual("foo-method-name", signature_def.method_name)
83 self.assertEqual(1, len(signature_def.inputs))
84 x_tensor_info_actual = signature_def.inputs["foo-input"]
91 self.assertEqual(1, len(signature_def.outputs))
92 y_tensor_info_actual = signature_def.outputs["foo-output"]
104 signature_def = signature_def_utils_impl.regression_signature_def(
108 signature_def.method_name)
111 self.assertEqual(1, len(signature_def.inputs))
113 signature_def.inputs[signature_constants.REGRESS_INPUTS])
[all …]
Dsimple_save_test.py90 signature_def_map = graph.signature_def
95 signature_def = signature_def_map[
98 signature_def.method_name)
100 self.assertEqual(1, len(signature_def.inputs))
101 self._check_tensor_info(signature_def.inputs["x"], var_x)
102 self.assertEqual(1, len(signature_def.outputs))
103 self._check_tensor_info(signature_def.outputs["y"], var_y)
Dload_v1_in_v2.py137 for signature_key, signature_def in meta_graph_def.signature_def.items():
138 if signature_def.inputs:
140 signature_def.inputs.items(), key=lambda item: item[1].name)
169 fetches = {name: out for name, out in signature_def.outputs.items()}
Dmethod_name_updater.py103 if signature_key not in meta_graph_def.signature_def:
110 meta_graph_def.signature_def[signature_key].method_name = method_name
Dbuilder_impl.py150 meta_graph_def.signature_def[key].CopyFrom(signature_def_map[key])
202 signature_def = signature_def_map[signature_def_key]
203 inputs = signature_def.inputs
204 outputs = signature_def.outputs
/external/tensorflow/tensorflow/python/tools/
Dsaved_model_aot_compile.py187 def _prune_removed_feed_nodes(signature_def, graph_def): argument
199 new_signature_def.CopyFrom(signature_def)
200 for (k, v) in signature_def.inputs.items():
273 signature_def_map = meta_graph_def.signature_def
280 signature_def = signature_def_map[signature_def_key]
281 if not signature_def.outputs:
284 signature_def_key, str(signature_def)))
295 meta_graph_def.graph_def, signature_def)
297 graph_def = _optimize_graph(meta_graph_def, signature_def)
329 for n in signature_def.outputs.values()
[all …]
Dsaved_model_cli.py113 return meta_graph_def.signature_def[signature_def_key].inputs
131 return meta_graph_def.signature_def[signature_def_key].outputs
170 meta_graph_def.signature_def[signature_def_key].method_name)
348 return meta_graph.signature_def
727 if args.signature_def is None:
730 _show_inputs_outputs(args.dir, args.tag_set, args.signature_def)
749 run_saved_model_with_feed_dict(args.dir, args.tag_set, args.signature_def,
/external/tensorflow/tensorflow/cc/tools/
Dfreeze_saved_model_test.cc41 SignatureDef signature_def; in BuildSignatureDef() local
43 (*signature_def.mutable_inputs())[input].set_name(input); in BuildSignatureDef()
46 (*signature_def.mutable_outputs())[output].set_name(output); in BuildSignatureDef()
48 return signature_def; in BuildSignatureDef()
52 void AddSignatureDefToSavedModelBundle(const SignatureDef& signature_def, in AddSignatureDefToSavedModelBundle() argument
56 (*meta_graph_def->mutable_signature_def())[key] = signature_def; in AddSignatureDefToSavedModelBundle()
91 SignatureDef signature_def = in AddGraphDefWithOutputsToSavedModelBundle() local
93 AddSignatureDefToSavedModelBundle(signature_def, "signature_def", in AddGraphDefWithOutputsToSavedModelBundle()
279 SignatureDef signature_def = in TEST_F() local
281 AddSignatureDefToSavedModelBundle(signature_def, "signature_def", in TEST_F()
[all …]
Dfreeze_saved_model.cc58 for (auto& sigdef_elem : saved_model_bundle.meta_graph_def.signature_def()) { in GetSignatureDefsInputsAndOutputs()
59 const SignatureDef& signature_def = sigdef_elem.second; in GetSignatureDefsInputsAndOutputs() local
60 for (auto& input_elem : signature_def.inputs()) { in GetSignatureDefsInputsAndOutputs()
63 for (auto& output_elem : signature_def.outputs()) { in GetSignatureDefsInputsAndOutputs()
/external/tensorflow/tensorflow/lite/python/
Dconvert_saved_model.py76 signature_def_map = meta_graph.signature_def
88 def get_inputs_outputs(signature_def): argument
97 inputs_tensor_info = signature_def.inputs
98 outputs_tensor_info = signature_def.outputs
188 signature_def = get_signature_def(meta_graph, signature_key)
189 inputs, outputs = get_inputs_outputs(signature_def)
Dinterpreter.py562 for _, signature_def in full_signature_defs.items():
563 signature_def['inputs'] = list(signature_def['inputs'].keys())
564 signature_def['outputs'] = list(signature_def['outputs'].keys())
Dlite.py746 signature_def = meta_graph.signature_def[
749 graph.get_tensor_by_name(signature_def.inputs[key].name)
750 for key in signature_def.inputs
753 graph.get_tensor_by_name(signature_def.outputs[key].name)
754 for key in signature_def.outputs
848 signature_def = meta_graph.signature_def[
851 graph.get_tensor_by_name(signature_def.inputs[key].name)
852 for key in signature_def.inputs
855 graph.get_tensor_by_name(signature_def.outputs[key].name)
856 for key in signature_def.outputs
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/
Dcontrol_flow_duplicate_v1.py54 signature_def = tf.saved_model.signature_def_utils.build_signature_def(
59 return {'key_1': signature_def, 'key_2': signature_def}, None, None
Dcontrol_flow_upgrade_legacy_v1.py46 signature_def = tf.saved_model.signature_def_utils.build_signature_def(
51 return {'key': signature_def}, None, None
Dshared_variable_v1.py54 signature_def = tf.saved_model.signature_def_utils.build_signature_def(
64 return {'key': signature_def, 'key2': signature_def2}, None, None
Dduplicate_method_names_v1.py48 signature_def = tf.saved_model.signature_def_utils.build_signature_def(
54 return {'key': signature_def, 'key2': signature_def2}, None, None
/external/tensorflow/tensorflow/lite/tools/signature/
Dsignature_def_utils.py72 signature_def = meta_graph_pb2.SignatureDef()
73 signature_def.ParseFromString(serialized)
74 return signature_def
Dsignature_def_util_test.cc50 auto signature_def = SignatureDef(); in GetTestSignatureDef() local
55 *signature_def.mutable_method_name() = kClassifyMethodName; in GetTestSignatureDef()
56 (*signature_def.mutable_inputs())[kSignatureInput] = input_tensor; in GetTestSignatureDef()
57 (*signature_def.mutable_outputs())[kSignatureOutput] = output_tensor; in GetTestSignatureDef()
58 return signature_def; in GetTestSignatureDef()
Dsignature_def_utils_test.py62 signature_def = saved_signature_def_map.get(serving_key)
63 self.assertIsNotNone(signature_def, 'SignatureDef not found')
64 self.assertEqual(signature_def.SerializeToString(),
Dsignature_def_util_wrapper_pybind11.cc34 tensorflow::SignatureDef signature_def; in WrappedSetSignatureDefMap() local
35 if (!signature_def.ParseFromString(entry.second)) { in WrappedSetSignatureDefMap()
38 signature_def_map[entry.first] = signature_def; in WrappedSetSignatureDefMap()
Dsignature_def_util.cc139 tensorflow::SignatureDef signature_def; in GetSignatureDefMap() local
140 if (!signature_def.ParseFromString(entry.second)) { in GetSignatureDefMap()
144 retrieved_signature_def_map[entry.first] = signature_def; in GetSignatureDefMap()
/external/tensorflow/tensorflow/cc/saved_model/
Dloader_util.cc33 const auto& sig_def_map = meta_graph_def.signature_def(); in GetInitOp()
35 meta_graph_def.signature_def().find(kSavedModelInitOpSignatureKey); in GetInitOp()
Dsaved_model_bundle_lite_test.cc75 const auto& signature_def = bundle.GetSignatures().at("regress_x_to_y"); in CheckSavedModelBundle() local
77 const string input_name = signature_def.inputs().at(kRegressInputs).name(); in CheckSavedModelBundle()
79 signature_def.outputs().at(kRegressOutputs).name(); in CheckSavedModelBundle()
/external/tensorflow/tensorflow/python/compiler/tensorrt/test/testdata/
Dgen_tftrt_model.py110 signature_def = signature_def_utils.build_signature_def(
123 signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY: signature_def

123