/external/tensorflow/tensorflow/python/framework/ |
D | fast_tensor_util.pyx | 10 tensor_proto, np.ndarray[np.uint16_t, ndim=1] nparray): argument 14 tensor_proto.half_val.append(nparray[i]) 22 tensor_proto, np.ndarray[np.uint16_t, ndim=1] nparray): argument 26 tensor_proto.half_val.append(nparray[i]) 30 tensor_proto, np.ndarray[np.float32_t, ndim=1] nparray): argument 34 tensor_proto.float_val.append(nparray[i]) 38 tensor_proto, np.ndarray[np.float64_t, ndim=1] nparray): argument 42 tensor_proto.double_val.append(nparray[i]) 46 tensor_proto, np.ndarray[np.int32_t, ndim=1] nparray): argument 50 tensor_proto.int_val.append(nparray[i]) [all …]
|
D | tensor_util.py | 46 def SlowAppendFloat16ArrayToTensorProto(tensor_proto, proto_values): argument 47 tensor_proto.half_val.extend( 51 def _MediumAppendFloat16ArrayToTensorProto(tensor_proto, proto_values): argument 54 tensor_proto, 63 def SlowAppendBFloat16ArrayToTensorProto(tensor_proto, proto_values): argument 64 tensor_proto.half_val.extend( 68 def FastAppendBFloat16ArrayToTensorProto(tensor_proto, proto_values): argument 70 tensor_proto, np.asarray( 122 def SlowAppendFloat32ArrayToTensorProto(tensor_proto, proto_values): argument 123 tensor_proto.float_val.extend([x.item() for x in proto_values]) [all …]
|
/external/tensorflow/tensorflow/core/framework/ |
D | tensor_util_test.cc | 463 TensorProto tensor_proto = in TEST() local 465 EXPECT_FALSE(tensor::CompressTensorProtoInPlace(&tensor_proto)); in TEST() 466 tensor_proto = in TEST() 468 EXPECT_FALSE(tensor::CompressTensorProtoInPlace(&tensor_proto)); in TEST() 469 tensor_proto = in TEST() 471 EXPECT_FALSE(tensor::CompressTensorProtoInPlace(&tensor_proto)); in TEST() 472 tensor_proto = in TEST() 474 EXPECT_FALSE(tensor::CompressTensorProtoInPlace(&tensor_proto)); in TEST() 475 tensor_proto = in TEST() 477 EXPECT_FALSE(tensor::CompressTensorProtoInPlace(&tensor_proto)); in TEST() [all …]
|
/external/tensorflow/tensorflow/core/kernels/ |
D | unique_op_test.cc | 41 TensorProto tensor_proto; in GetRandomInt32TensorProto() local 42 tensor_proto.set_dtype(DT_INT32); in GetRandomInt32TensorProto() 43 tensor_proto.mutable_tensor_shape()->add_dim()->set_size(dim); in GetRandomInt32TensorProto() 44 tensor_proto.mutable_tensor_shape()->set_unknown_rank(false); in GetRandomInt32TensorProto() 47 tensor_proto.add_int_val(int_val); in GetRandomInt32TensorProto() 49 return tensor_proto; in GetRandomInt32TensorProto() 54 TensorProto tensor_proto; in GetRandomInt32TensorProtoWithRepeat() local 55 tensor_proto.set_dtype(DT_INT32); in GetRandomInt32TensorProtoWithRepeat() 56 tensor_proto.mutable_tensor_shape()->add_dim()->set_size(dim); in GetRandomInt32TensorProtoWithRepeat() 57 tensor_proto.mutable_tensor_shape()->set_unknown_rank(false); in GetRandomInt32TensorProtoWithRepeat() [all …]
|
D | control_flow_ops_test.cc | 182 TensorProto tensor_proto; in TEST() local 184 .Attr("value", tensor_proto) in TEST() 190 .Attr("value", tensor_proto) in TEST()
|
/external/tensorflow/tensorflow/dtensor/cc/ |
D | small_constant_optimization.cc | 104 TensorProto tensor_proto; in ExtractSmallTensorValue() local 105 tensor_proto.set_dtype(datatype); in ExtractSmallTensorValue() 110 &tensor_proto); in ExtractSmallTensorValue() 116 &tensor_proto); in ExtractSmallTensorValue() 122 &tensor_proto); in ExtractSmallTensorValue() 128 &tensor_proto); in ExtractSmallTensorValue() 147 shape.AsProto(tensor_proto.mutable_tensor_shape()); in ExtractSmallTensorValue() 148 AddNodeAttr("value", tensor_proto, &node_def); in ExtractSmallTensorValue()
|
/external/tensorflow/tensorflow/core/kernels/data/experimental/ |
D | auto_shard_dataset_op_test.cc | 249 TensorProto tensor_proto; in TEST_F() local 251 .Attr("value", tensor_proto) in TEST_F() 259 .Attr("value", tensor_proto) in TEST_F() 264 .Attr("value", tensor_proto) in TEST_F() 305 TensorProto tensor_proto; in TEST_F() local 307 .Attr("value", tensor_proto) in TEST_F() 315 .Attr("value", tensor_proto) in TEST_F() 356 TensorProto tensor_proto; in TEST_F() local 358 .Attr("value", tensor_proto) in TEST_F() 366 .Attr("value", tensor_proto) in TEST_F() [all …]
|
/external/tensorflow/tensorflow/c/ |
D | kernels_test.cc | 404 ::tensorflow::TensorProto tensor_proto; in TEST_F() 405 tensor_proto.mutable_tensor_shape()->add_dim()->set_size(2); in TEST_F() 406 tensor_proto.mutable_tensor_shape()->add_dim()->set_size(3); in TEST_F() 407 tensor_proto.set_dtype(DT_INT32); in TEST_F() 408 tensor_proto.add_int_val(1); in TEST_F() 409 tensor_proto.add_int_val(2); in TEST_F() 410 tensor_proto.add_int_val(3); in TEST_F() 411 tensor_proto.add_int_val(4); in TEST_F() 412 tensor_proto.add_int_val(5); in TEST_F() 413 tensor_proto.add_int_val(6); in TEST_F() [all …]
|
/external/tensorflow/tensorflow/core/tpu/ |
D | virtual_device.cc | 79 Status VirtualDevice::MakeTensorFromProto(const TensorProto& tensor_proto, in MakeTensorFromProto() argument 82 Tensor parsed(tensor_proto.dtype()); in MakeTensorFromProto() 84 if (!parsed.FromProto(allocator, tensor_proto)) { in MakeTensorFromProto() 86 tensor_proto.DebugString()); in MakeTensorFromProto()
|
/external/tensorflow/tensorflow/core/common_runtime/ |
D | threadpool_device.cc | 122 const TensorProto& tensor_proto, const AllocatorAttributes alloc_attrs, in MakeTensorFromProto() argument 124 if (tensor_proto.dtype() > 0 && tensor_proto.dtype() <= DataType_MAX) { in MakeTensorFromProto() 125 Tensor parsed(tensor_proto.dtype()); in MakeTensorFromProto() 126 if (parsed.FromProto(allocator_, tensor_proto)) { in MakeTensorFromProto() 132 tensor_proto.DebugString()); in MakeTensorFromProto()
|
D | single_threaded_cpu_device.cc | 61 Status MakeTensorFromProto(const TensorProto& tensor_proto, in MakeTensorFromProto() argument 64 Tensor parsed(tensor_proto.dtype()); in MakeTensorFromProto() 65 if (!parsed.FromProto(cpu_allocator(), tensor_proto)) { in MakeTensorFromProto()
|
/external/tensorflow/tensorflow/core/grappler/optimizers/ |
D | evaluation_utils.cc | 50 Status DeviceSimple::MakeTensorFromProto(const TensorProto& tensor_proto, in MakeTensorFromProto() argument 53 Tensor parsed(tensor_proto.dtype()); in MakeTensorFromProto() 54 if (!parsed.FromProto(cpu_allocator(), tensor_proto)) { in MakeTensorFromProto()
|
/external/tensorflow/tensorflow/core/grappler/costs/ |
D | graph_properties.cc | 402 TensorProto tensor_proto; in MakeTensorProtoFromShape() local 403 tensor_proto.set_dtype(dtype); in MakeTensorProtoFromShape() 404 auto* shape_proto = tensor_proto.mutable_tensor_shape(); in MakeTensorProtoFromShape() 412 tensor_proto.add_int_val(value); in MakeTensorProtoFromShape() 414 tensor_proto.add_int64_val(value); in MakeTensorProtoFromShape() 417 return tensor_proto; in MakeTensorProtoFromShape() 422 const TensorProto& tensor_proto, in MakeConstNodeDefFromTensorProto() argument 430 *tensor = tensor_proto; in MakeConstNodeDefFromTensorProto() 475 uint64 NumElementsFromTensorProto(const TensorProto& tensor_proto) { in NumElementsFromTensorProto() argument 476 if (!tensor_proto.has_tensor_shape()) { in NumElementsFromTensorProto() [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/tfrt/tests/tf_to_corert/ |
D | const_tensor.mlir | 24 // CHECK-LABEL: func @tensor_proto 25 func.func @tensor_proto() -> tensor<!tf_type.quint8> { 28 …%0 = "tf.Const"() {value = #tf_type<tensor_proto : "0x746674656E736F722464747970653A2044545F515549…
|
/external/tensorflow/tensorflow/core/debug/ |
D | debug_io_utils.cc | 129 TensorProto* tensor_proto, in WrapStringTensorAsEvents() argument 131 const protobuf::RepeatedPtrField<string>& strs = tensor_proto->string_val(); in WrapStringTensorAsEvents() 160 num_chunks, i, tensor_proto->dtype(), in WrapStringTensorAsEvents() 161 tensor_proto->tensor_shape()); in WrapStringTensorAsEvents() 166 tensor_proto->mutable_string_val()); in WrapStringTensorAsEvents() 190 TensorProto tensor_proto; in WrapTensorAsEvents() local 195 tensor.AsProtoField(&tensor_proto); in WrapTensorAsEvents() 198 debug_node_key, wall_time_us, chunk_size_limit, &tensor_proto, events)); in WrapTensorAsEvents() 200 tensor.AsProtoTensorContent(&tensor_proto); in WrapTensorAsEvents() 202 const size_t total_length = tensor_proto.tensor_content().size(); in WrapTensorAsEvents() [all …]
|
D | debug_grpc_testlib.cc | 54 const TensorProto& tensor_proto = val.tensor(); in SendEvents() local 55 Tensor tensor(tensor_proto.dtype()); in SendEvents() 56 if (!tensor.FromProto(tensor_proto)) { in SendEvents()
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/utils/ |
D | convert_tensor.cc | 62 TensorProto tensor_proto; in ConvertToProto() local 70 input_tensor.AsProtoTensorContent(&tensor_proto); in ConvertToProto() 72 input_tensor.AsProtoField(&tensor_proto); in ConvertToProto() 73 return tensor_proto; in ConvertToProto() 482 TensorProto tensor_proto; in ConvertToTensor() local 483 TF_RETURN_IF_ERROR(ConvertToTensorProto(attr, &tensor_proto)); in ConvertToTensor() 484 if (!output_tensor->FromProto(tensor_proto)) { in ConvertToTensor()
|
/external/tensorflow/tensorflow/core/ir/importexport/ |
D | convert_tensor.cc | 59 TensorProto tensor_proto; in ConvertToProto() local 67 input_tensor.AsProtoTensorContent(&tensor_proto); in ConvertToProto() 69 input_tensor.AsProtoField(&tensor_proto); in ConvertToProto() 70 return tensor_proto; in ConvertToProto() 481 TensorProto tensor_proto; in ConvertToTensor() local 482 TF_RETURN_IF_ERROR(ConvertToTensorProto(attr, &tensor_proto)); in ConvertToTensor() 483 if (!output_tensor->FromProto(tensor_proto)) { in ConvertToTensor()
|
/external/tensorflow/tensorflow/core/transforms/utils/ |
D | eval_utils.cc | 66 const tensorflow::TensorProto &tensor_proto, in MakeTensorFromProto() argument 69 tensorflow::Tensor parsed(tensor_proto.dtype()); in MakeTensorFromProto() 70 if (!parsed.FromProto(tensorflow::cpu_allocator(), tensor_proto)) { in MakeTensorFromProto()
|
/external/tensorflow/tensorflow/python/debug/lib/ |
D | debug_data.py | 57 def __init__(self, tensor_proto, initialized=True): argument 65 self._tensor_proto = tensor_proto 116 tensor_proto = event.summary.value[0].tensor 117 shape = tensor_util.TensorShapeProtoToList(tensor_proto.tensor_shape) 122 if tensor_proto.tensor_content or tensor_proto.string_val or not num_elements: 124 if tensor_proto.dtype == types_pb2.DT_RESOURCE: 125 tensor_value = InconvertibleTensorProto(tensor_proto) 128 tensor_value = tensor_util.MakeNdarray(tensor_proto) 130 tensor_value = InconvertibleTensorProto(tensor_proto) 133 tensor_value = InconvertibleTensorProto(tensor_proto, False)
|
D | dumping_callback.py | 509 tensor_proto = _concrete_tensor_to_proto( 516 tensor_proto = tensor_pb2.TensorProto() 520 tensor_proto = _concrete_tensor_to_proto( 527 tensor_proto = tensor_pb2.TensorProto() 529 tensor_proto = _concrete_tensor_to_proto(tensor) 530 if tensor_proto: 531 execution_proto.tensor_protos.append(tensor_proto)
|
/external/tensorflow/tensorflow/compiler/mlir/quantization/tensorflow/passes/ |
D | convert_tf_quant_ops_to_mhlo.cc | 131 tensorflow::TensorProto tensor_proto; in matchAndRewrite() local 133 tfg::mangling_util::DemangleTensor(tensor_view, &tensor_proto); in matchAndRewrite() 139 if (!t.FromProto(tensor_proto)) { in matchAndRewrite()
|
/external/tensorflow/tensorflow/core/kernels/data/ |
D | batch_dataset_op_test.cc | 350 TensorProto tensor_proto; in TEST() local 352 .Attr("value", tensor_proto) in TEST() 359 .Attr("value", tensor_proto) in TEST() 364 .Attr("value", tensor_proto) in TEST()
|
/external/tensorflow/tensorflow/compiler/jit/ |
D | xla_device.cc | 505 const TensorProto& tensor_proto, in MakeTensorFromProto() argument 508 Tensor parsed(tensor_proto.dtype()); in MakeTensorFromProto() 509 if (!parsed.FromProto(cpu_allocator(), tensor_proto)) { in MakeTensorFromProto() 511 tensor_proto.DebugString()); in MakeTensorFromProto() 532 Status XlaDevice::MakeTensorFromProto(const TensorProto& tensor_proto, in MakeTensorFromProto() argument 538 return MakeTensorFromProto(device_context, tensor_proto, alloc_attrs, tensor); in MakeTensorFromProto()
|
/external/tensorflow/tensorflow/python/eager/ |
D | function_saved_model_utils.py | 81 tensor_proto = ( 83 ndarray = tensor_util.MakeNdarray(tensor_proto) 84 if dtypes.as_dtype(tensor_proto.dtype) == dtypes.string:
|