Home
last modified time | relevance | path

Searched refs:tensor_info (Results 1 – 23 of 23) sorted by relevance

/external/tensorflow/tensorflow/python/saved_model/
Dutils_impl.py76 tensor_info = meta_graph_pb2.TensorInfo(
80 tensor_info.coo_sparse.values_tensor_name = tensor.values.name
81 tensor_info.coo_sparse.indices_tensor_name = tensor.indices.name
82 tensor_info.coo_sparse.dense_shape_tensor_name = tensor.dense_shape.name
84 tensor_info.name = tensor.name
85 return tensor_info
91 tensor_info = meta_graph_pb2.TensorInfo()
94 tensor_info.composite_tensor.type_spec.CopyFrom(spec_proto.type_spec_value)
96 tensor_info.composite_tensor.components.add().CopyFrom(
98 return tensor_info
[all …]
Dutils_test.py118 tensor_info = utils.build_tensor_info(expected)
119 actual = utils.get_tensor_from_tensor_info(tensor_info)
126 tensor_info = utils.build_tensor_info(expected)
127 actual = utils.get_tensor_from_tensor_info(tensor_info)
136 tensor_info = utils.build_tensor_info(expected)
137 actual = utils.get_tensor_from_tensor_info(tensor_info)
145 tensor_info = utils.build_tensor_info(expected)
148 actual = utils.get_tensor_from_tensor_info(tensor_info,
159 tensor_info = utils.build_tensor_info(unscoped)
160 self.assertEqual("bar/x:0", tensor_info.name)
[all …]
Dbuilder_impl.py155 def _validate_tensor_info(self, tensor_info): argument
168 if tensor_info is None:
172 if tensor_info.WhichOneof("encoding") is None:
177 % tensor_info)
178 if tensor_info.WhichOneof("encoding") == "composite_tensor":
179 for component in tensor_info.composite_tensor.components:
181 elif tensor_info.dtype == types_pb2.DT_INVALID:
184 "field set: %s" % tensor_info)
754 asset_proto.tensor_info.name = asset_tensor.name
788 asset_proto.tensor_info.name = asset_tensor.name
Dsignature_def_utils_impl.py383 tensor_info = signature_def.outputs[key]
388 tensor_info, import_scope=import_scope)
Dsaved_model_test.py125 asset_file_def[asset_id].tensor_info.name)
127 def _validate_inputs_tensor_info_fail(self, builder, tensor_info): argument
132 "foo_inputs": tensor_info
140 def _validate_inputs_tensor_info_accept(self, builder, tensor_info): argument
145 {"foo_inputs": tensor_info}, dict(), "foo")
149 def _validate_outputs_tensor_info_fail(self, builder, tensor_info): argument
154 dict(), {"foo_outputs": tensor_info}, "foo")
161 def _validate_outputs_tensor_info_accept(self, builder, tensor_info): argument
166 dict(), {"foo_outputs": tensor_info}, "foo")
1399 self.assertEqual(expected_asset_tensor_name, asset.tensor_info.name)
Dloader_impl.py155 tensor_name = asset_proto.tensor_info.name
Dsave.py634 asset_def.tensor_info.name = asset_path_initializer.name
/external/tflite-support/tensorflow_lite_support/codegen/
Dandroid_java_generator.cc110 TensorInfo tensor_info; in CreateTensorInfo() local
113 tensor_info.associated_axis_label_index = FindAssociatedFile( in CreateTensorInfo()
115 tensor_info.associated_value_label_index = FindAssociatedFile( in CreateTensorInfo()
117 if (is_input && (tensor_info.associated_axis_label_index >= 0 || in CreateTensorInfo()
118 tensor_info.associated_value_label_index >= 0)) { in CreateTensorInfo()
125 if (tensor_info.associated_axis_label_index >= 0 && in CreateTensorInfo()
126 tensor_info.associated_value_label_index >= 0) { in CreateTensorInfo()
132 tensor_info.is_input = is_input; in CreateTensorInfo()
133 tensor_info.name = SnakeCaseToCamelCase(name); in CreateTensorInfo()
134 tensor_info.upper_camel_name = tensor_info.name; in CreateTensorInfo()
[all …]
/external/tensorflow/tensorflow/lite/delegates/gpu/common/memory_management/
Dgreedy_by_breadth_assignment.cc59 for (const auto& tensor_info : task_profiles[task_id]) { in GreedyByBreadthAssignment() local
60 breadth += tensor_info.usage_record->tensor_size; in GreedyByBreadthAssignment()
74 for (const auto& tensor_info : task_profiles[task.task_id]) { in GreedyByBreadthAssignment() local
75 if (assignment->object_ids[tensor_info.idx] != kNotAssigned) { in GreedyByBreadthAssignment()
78 const auto& rec = *tensor_info.usage_record; in GreedyByBreadthAssignment()
131 assignment->object_ids[tensor_info.idx] = best_object; in GreedyByBreadthAssignment()
/external/tensorflow/tensorflow/lite/python/
Dconvert_saved_model.py30 def _log_tensor_details(tensor_info): argument
32 for key in tensor_info:
33 val = tensor_info[key]
104 def gather_names(tensor_info): argument
105 return [tensor_info[key].name for key in tensor_info]
/external/tensorflow/tensorflow/cc/tools/
Dfreeze_saved_model.cc36 void GetTensorNamesFromTensorInfo(const TensorInfo& tensor_info, in GetTensorNamesFromTensorInfo() argument
38 if (tensor_info.has_coo_sparse()) { in GetTensorNamesFromTensorInfo()
41 const TensorInfo_CooSparse& coo_sparse = tensor_info.coo_sparse(); in GetTensorNamesFromTensorInfo()
45 } else if (tensor_info.has_composite_tensor()) { in GetTensorNamesFromTensorInfo()
46 for (const auto& component : tensor_info.composite_tensor().components()) { in GetTensorNamesFromTensorInfo()
50 tensor_names->insert(tensor_info.name()); in GetTensorNamesFromTensorInfo()
/external/tensorflow/tensorflow/python/eager/
Dwrap_function.py98 def _get_element_from_tensor_info(tensor_info, graph): argument
100 encoding = tensor_info.WhichOneof("encoding")
104 return graph.as_graph_element(tensor_info.name)
107 graph.get_tensor_by_name(tensor_info.coo_sparse.indices_tensor_name),
108 graph.get_tensor_by_name(tensor_info.coo_sparse.values_tensor_name),
110 tensor_info.coo_sparse.dense_shape_tensor_name))
114 type_spec_value=tensor_info.composite_tensor.type_spec)
117 tensor_info.composite_tensor.components]
/external/tensorflow/tensorflow/python/compiler/tensorrt/model_tests/
Dmodel_handler.py89 def _generate_random_tensor_v1(tensor_info: meta_graph_pb2.TensorInfo,
92 dtype = tf_dtypes.as_dtype(tensor_info.dtype)
93 shape = _get_concrete_tensor_shape(tensor_info.tensor_shape, batch_size)
99 name=_remove_graph_sequence_number(tensor_info.name)).eval()
294 tensor_info.name: _generate_random_tensor_v1(tensor_info, batch_size)
295 for tensor_info in self.input_tensor_info.values()
/external/tensorflow/tensorflow/tools/api/golden/v1/
Dtensorflow.saved_model.utils.pbtxt9 …argspec: "args=[\'tensor_info\', \'graph\', \'import_scope\'], varargs=None, keywords=None, defaul…
Dtensorflow.saved_model.pbtxt173 …argspec: "args=[\'tensor_info\', \'graph\', \'import_scope\'], varargs=None, keywords=None, defaul…
/external/tensorflow/tensorflow/python/tools/
Dsaved_model_cli.py262 def _print_tensor_info(tensor_info, indent=0): argument
275 for (key, value) in types_pb2.DataType.items()}[tensor_info.dtype])
277 if tensor_info.tensor_shape.unknown_rank:
280 dims = [str(dim.size) for dim in tensor_info.tensor_shape.dim]
284 in_print(' name: ' + tensor_info.name)
Dsaved_model_aot_compile.py385 for tensor_info in (
388 fetch_collection.node_list.value.append(tensor_info.name)
/external/tensorflow/tensorflow/python/compiler/tensorrt/
Dtrt_convert.py544 def _gather_names(tensor_info): argument
546 return {tensor_info[key].name.split(":")[0] for key in tensor_info}
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/translate/
Dimport_model.cc3541 results.push_back({asset.tensor_info().name(), asset_op}); in ConvertAssets()
3582 TensorInfo tensor_info; in ConvertInitializer() local
3583 tensor_info.set_name(asset.tensor_name); in ConvertInitializer()
3584 tensor_info.set_dtype(DT_STRING); in ConvertInitializer()
3585 tensor_info.mutable_tensor_shape(); in ConvertInitializer()
3586 inputs.push_back({asset.tensor_name, tensor_info}); in ConvertInitializer()
3693 const auto& tensor_info = iter.second; in ParseInputArrays() local
3696 DCHECK_EQ(tensor_info.encoding_case(), tensorflow::TensorInfo::kName); in ParseInputArrays()
3699 << ", tensor_info = " << tensor_info.DebugString(); in ParseInputArrays()
3702 array_info.imported_dtype = tensor_info.dtype(); in ParseInputArrays()
[all …]
/external/tensorflow/tensorflow/cc/saved_model/
Dloader.cc131 {asset_file_def.tensor_info().name(), assets_file_path_tensor}); in AddAssetsTensorsToInputs()
/external/tensorflow/tensorflow/core/protobuf/
Dsaved_object_graph.proto95 // `AssetFileDef.tensor_info`, MUST be ignored.
Dmeta_graph.proto337 TensorInfo tensor_info = 1; field
/external/tensorflow/tensorflow/core/grappler/
Dgrappler_item_builder.cc499 asset_node_to_value[NodeName(asset_file_def.tensor_info().name())] = in GrapplerItemFromMetaGraphDef()