Home
last modified time | relevance | path

Searched refs:tensor_proto (Results 1 – 25 of 52) sorted by relevance

123

/external/tensorflow/tensorflow/python/framework/
Dfast_tensor_util.pyx10 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 …]
Dtensor_util.py49 def SlowAppendFloat16ArrayToTensorProto(tensor_proto, proto_values): argument
50 tensor_proto.half_val.extend(
54 def _MediumAppendFloat16ArrayToTensorProto(tensor_proto, proto_values): argument
57 tensor_proto,
66 def SlowAppendBFloat16ArrayToTensorProto(tensor_proto, proto_values): argument
67 tensor_proto.half_val.extend(
71 def FastAppendBFloat16ArrayToTensorProto(tensor_proto, proto_values): argument
73 tensor_proto, np.asarray(
125 def SlowAppendFloat32ArrayToTensorProto(tensor_proto, proto_values): argument
126 tensor_proto.float_val.extend([x.item() for x in proto_values])
[all …]
/external/tensorflow/tensorflow/core/kernels/
Dunique_op_test.cc39 TensorProto tensor_proto; in GetRandomInt32TensorProto() local
40 tensor_proto.set_dtype(DT_INT32); in GetRandomInt32TensorProto()
41 tensor_proto.mutable_tensor_shape()->add_dim()->set_size(dim); in GetRandomInt32TensorProto()
42 tensor_proto.mutable_tensor_shape()->set_unknown_rank(false); in GetRandomInt32TensorProto()
45 tensor_proto.add_int_val(int_val); in GetRandomInt32TensorProto()
47 return tensor_proto; in GetRandomInt32TensorProto()
52 TensorProto tensor_proto; in GetRandomInt32TensorProtoWithRepeat() local
53 tensor_proto.set_dtype(DT_INT32); in GetRandomInt32TensorProtoWithRepeat()
54 tensor_proto.mutable_tensor_shape()->add_dim()->set_size(dim); in GetRandomInt32TensorProtoWithRepeat()
55 tensor_proto.mutable_tensor_shape()->set_unknown_rank(false); in GetRandomInt32TensorProtoWithRepeat()
[all …]
/external/tensorflow/tensorflow/core/framework/
Dtensor_util_test.cc437 TensorProto tensor_proto = in TEST() local
439 EXPECT_FALSE(tensor::CompressTensorProtoInPlace(&tensor_proto)); in TEST()
440 tensor_proto = in TEST()
442 EXPECT_FALSE(tensor::CompressTensorProtoInPlace(&tensor_proto)); in TEST()
443 tensor_proto = in TEST()
445 EXPECT_FALSE(tensor::CompressTensorProtoInPlace(&tensor_proto)); in TEST()
446 tensor_proto = in TEST()
448 EXPECT_FALSE(tensor::CompressTensorProtoInPlace(&tensor_proto)); in TEST()
449 tensor_proto = in TEST()
451 EXPECT_FALSE(tensor::CompressTensorProtoInPlace(&tensor_proto)); in TEST()
[all …]
/external/tensorflow/tensorflow/core/common_runtime/
Dthreadpool_device.cc92 const TensorProto& tensor_proto, const AllocatorAttributes alloc_attrs, in MakeTensorFromProto() argument
94 if (tensor_proto.dtype() > 0 && tensor_proto.dtype() <= DataType_MAX) { in MakeTensorFromProto()
95 Tensor parsed(tensor_proto.dtype()); in MakeTensorFromProto()
96 if (parsed.FromProto(allocator_, tensor_proto)) { in MakeTensorFromProto()
102 ProtoDebugString(tensor_proto)); in MakeTensorFromProto()
Dsingle_threaded_cpu_device.cc65 Status MakeTensorFromProto(const TensorProto& tensor_proto, in MakeTensorFromProto() argument
68 Tensor parsed(tensor_proto.dtype()); in MakeTensorFromProto()
69 if (!parsed.FromProto(cpu_allocator(), tensor_proto)) { in MakeTensorFromProto()
Drenamed_device.h91 Status MakeTensorFromProto(const TensorProto& tensor_proto, in MakeTensorFromProto() argument
94 return underlying_->MakeTensorFromProto(tensor_proto, alloc_attrs, tensor); in MakeTensorFromProto()
Dthreadpool_device.h38 Status MakeTensorFromProto(const TensorProto& tensor_proto,
Dconstant_folding_test.cc54 const TensorProto* tensor_proto; in ExpectNodeClose() local
55 TF_EXPECT_OK(GetNodeAttr(n->attrs(), "value", &tensor_proto)); in ExpectNodeClose()
59 EXPECT_TRUE(t.FromProto(*tensor_proto)); in ExpectNodeClose()
67 const TensorProto* tensor_proto; in ExpectNodeEqual() local
68 TF_EXPECT_OK(GetNodeAttr(n->attrs(), "value", &tensor_proto)); in ExpectNodeEqual()
72 EXPECT_TRUE(t.FromProto(*tensor_proto)); in ExpectNodeEqual()
/external/tensorflow/tensorflow/contrib/util/
Dconvert_graphdef_memmapped_format_lib.cc45 const TensorProto& tensor_proto = value.tensor(); in ConvertConstantsToImmutable() local
50 const DataType tensor_data_type = tensor_proto.dtype(); in ConvertConstantsToImmutable()
51 const TensorShapeProto tensor_shape = tensor_proto.tensor_shape(); in ConvertConstantsToImmutable()
68 Tensor parsed(tensor_proto.dtype()); in ConvertConstantsToImmutable()
69 if (!parsed.FromProto(cpu_allocator(), tensor_proto)) { in ConvertConstantsToImmutable()
71 tensor_proto.DebugString()); in ConvertConstantsToImmutable()
/external/tensorflow/tensorflow/core/common_runtime/sycl/
Dsycl_device.cc45 Status SYCLDevice::MakeTensorFromProto(const TensorProto& tensor_proto, in MakeTensorFromProto() argument
52 Tensor parsed(tensor_proto.dtype()); in MakeTensorFromProto()
53 if (!parsed.FromProto(host_alloc, tensor_proto)) { in MakeTensorFromProto()
55 tensor_proto.DebugString()); in MakeTensorFromProto()
/external/tensorflow/tensorflow/core/grappler/costs/
Dop_level_cost_estimator_test.cc338 TensorProto* tensor_proto) { in GetTensorProto() argument
339 tensor_proto->Clear(); in GetTensorProto()
362 tensor.AsProtoTensorContent(tensor_proto); in GetTensorProto()
364 tensor.AsProtoField(tensor_proto); in GetTensorProto()
386 auto* tensor_proto = op_info.mutable_inputs(0)->mutable_value(); in DescribePoolingOp() local
388 /*tensor_content=*/false, tensor_proto); in DescribePoolingOp()
936 TensorProto tensor_proto; in TEST_F() local
941 tensor_proto.mutable_tensor_shape()->add_dim()->set_size(255); in TEST_F()
943 GetTensorShapeProtoFromTensorProto(tensor_proto, &tensor_shape_proto)); in TEST_F()
945 tensor_proto.Clear(); in TEST_F()
[all …]
Dgraph_properties.cc372 TensorProto tensor_proto; in MakeTensorProtoFromShape() local
373 tensor_proto.set_dtype(dtype); in MakeTensorProtoFromShape()
374 auto* shape_proto = tensor_proto.mutable_tensor_shape(); in MakeTensorProtoFromShape()
382 tensor_proto.add_int_val(value); in MakeTensorProtoFromShape()
384 tensor_proto.add_int64_val(value); in MakeTensorProtoFromShape()
387 return tensor_proto; in MakeTensorProtoFromShape()
392 const TensorProto& tensor_proto, in MakeConstNodeDefFromTensorProto() argument
400 *tensor = tensor_proto; in MakeConstNodeDefFromTensorProto()
791 auto* tensor_proto = src_ctx->output_tensor_protos[src_output]; in UpdateNode() local
792 if (tensor_proto != nullptr && in UpdateNode()
[all …]
/external/tensorflow/tensorflow/core/debug/
Ddebug_io_utils.cc129 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 …]
Ddebug_grpc_testlib.cc54 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/core/grappler/optimizers/
Devaluation_utils.cc71 Status DeviceSimple::MakeTensorFromProto(const TensorProto& tensor_proto, in MakeTensorFromProto() argument
74 Tensor parsed(tensor_proto.dtype()); in MakeTensorFromProto()
75 if (!parsed.FromProto(cpu_allocator(), tensor_proto)) { in MakeTensorFromProto()
Devaluation_utils.h40 Status MakeTensorFromProto(const TensorProto& tensor_proto,
/external/tensorflow/tensorflow/python/debug/lib/
Ddebug_data.py62 def __init__(self, tensor_proto, initialized=True): argument
70 self._tensor_proto = tensor_proto
121 tensor_proto = event.summary.value[0].tensor
122 shape = tensor_util.TensorShapeProtoToList(tensor_proto.tensor_shape)
127 if tensor_proto.tensor_content or tensor_proto.string_val or not num_elements:
129 if tensor_proto.dtype == types_pb2.DT_RESOURCE:
130 tensor_value = InconvertibleTensorProto(tensor_proto)
133 tensor_value = tensor_util.MakeNdarray(tensor_proto)
135 tensor_value = InconvertibleTensorProto(tensor_proto)
138 tensor_value = InconvertibleTensorProto(tensor_proto, False)
/external/tensorflow/tensorflow/contrib/gdr/
Dgdr_worker.cc98 TensorProto* tensor_proto = proto->mutable_tensor(); in GrpcRecvTensorAsync() local
99 tensor_proto->set_dtype(val.dtype()); in GrpcRecvTensorAsync()
100 val.shape().AsProto(tensor_proto->mutable_tensor_shape()); in GrpcRecvTensorAsync()
/external/tensorflow/tensorflow/cc/framework/
Dops.h183 TensorProto tensor_proto;
185 tensor.AsProtoTensorContent(&tensor_proto);
187 tensor.AsProtoField(&tensor_proto);
189 return tensor_proto;
/external/tensorflow/tensorflow/python/debug/cli/
Dtensor_format_test.py342 tensor_proto = tensor_pb2.TensorProto(
347 debug_data.InconvertibleTensorProto(tensor_proto, False), "a")
351 self.assertEqual(str(tensor_proto).split("\n"), out.lines[3:])
354 tensor_proto = tensor_pb2.TensorProto(
359 debug_data.InconvertibleTensorProto(tensor_proto), "a")
362 self.assertEqual(str(tensor_proto).split("\n"), out.lines[2:])
626 tensor_proto = tensor_pb2.TensorProto(
631 debug_data.InconvertibleTensorProto(tensor_proto, False), "a")
/external/tensorflow/tensorflow/tools/graph_transforms/
Dtransform_utils.h86 TensorProto tensor_proto; in SetNodeTensorAttr() local
87 tensor.AsProtoTensorContent(&tensor_proto); in SetNodeTensorAttr()
88 SetNodeAttr(key, tensor_proto, node); in SetNodeTensorAttr()
/external/tensorflow/tensorflow/compiler/jit/
Dxla_device.cc440 Status XlaDevice::MakeTensorFromProto(const TensorProto& tensor_proto, in MakeTensorFromProto() argument
445 Tensor parsed(tensor_proto.dtype()); in MakeTensorFromProto()
446 if (!parsed.FromProto(cpu_allocator(), tensor_proto)) { in MakeTensorFromProto()
448 tensor_proto.DebugString()); in MakeTensorFromProto()
/external/tensorflow/tensorflow/core/kernels/hexagon/
Dgraph_transferer.cc737 const TensorProto* tensor_proto = nullptr; in RegisterPadNode() local
738 TF_CHECK_OK(GetNodeAttr(input_node->attrs(), "value", &tensor_proto)); in RegisterPadNode()
739 CHECK_NOTNULL(tensor_proto); in RegisterPadNode()
741 TF_CHECK_OK(MakeTensorFromProto(*tensor_proto, &const_tensor)); in RegisterPadNode()
1101 const TensorProto& tensor_proto, Tensor* tensor) { in MakeTensorFromProto() argument
1102 if (tensor_proto.dtype() > 0 && tensor_proto.dtype() <= DataType_MAX) { in MakeTensorFromProto()
1103 Tensor parsed(tensor_proto.dtype()); in MakeTensorFromProto()
1104 if (parsed.FromProto(cpu_allocator(), tensor_proto)) { in MakeTensorFromProto()
1110 tensor_proto.DebugString()); in MakeTensorFromProto()
/external/tensorflow/tensorflow/compiler/tf2xla/
Dxla_compilation_device.h59 Status MakeTensorFromProto(const TensorProto& tensor_proto,

123