/external/tensorflow/tensorflow/core/framework/ |
tensor_util.h | 19 #include "tensorflow/core/framework/tensor.h" 23 namespace tensor { namespace in namespace:tensorflow 25 // DeepCopy returns a tensor whose contents are a deep copy of the 30 // REQUIRES: 'other' must be a Tensor of a copy-able type if 32 Tensor DeepCopy(const Tensor& other); 34 // Concatenates 'tensors' into a single tensor, along their 0th dimension. 39 // REQUIRES: Each member of 'tensors' must be a Tensor of a copy-able type if it 41 Status Concat(const gtl::ArraySlice<Tensor>& tensors, 42 Tensor* result) TF_MUST_USE_RESULT [all...] |
session_state.h | 23 #include "tensorflow/core/framework/tensor.h" 33 // Get a tensor from the session state. 34 Status GetTensor(const string& handle, Tensor* tensor); 36 // Store a tensor in the session state. 37 Status AddTensor(const string& handle, const Tensor& tensor); 52 // The live tensors in the session. A map from tensor handle to tensor. 53 std::unordered_map<string, Tensor> tensors_ 61 Tensor tensor; member in struct:tensorflow::TensorStore::TensorAndKey [all...] |
tensor_util.cc | 19 #include "tensorflow/core/framework/tensor.h" 24 namespace tensor { namespace in namespace:tensorflow 26 Tensor DeepCopy(const Tensor& other) { 27 Tensor tmp = Tensor(other.dtype(), other.shape()); 32 // We use StringPiece as a convenient map over the tensor buffer, 48 Status Concat(const gtl::ArraySlice<Tensor>& tensors, Tensor* result) { 53 for (const Tensor& tensor : tensors) [all...] |
/external/tensorflow/tensorflow/contrib/lite/ |
optional_debug_tools.cc | 82 TfLiteTensor* tensor = interpreter->tensor(tensor_index); local 83 printf("Tensor %3d %10s %15s %10zu bytes (%4.1f MB) ", tensor_index, 84 TensorTypeName(tensor->type), AllocTypeName(tensor->allocation_type), 85 tensor->bytes, float(tensor->bytes) / float(1 << 20)); 86 PrintTfLiteIntVector(tensor->dims);
|
arena_planner.cc | 30 // The tensor index to be allocated or deallocated. 31 int tensor; member in struct:tflite::AllocationInfo 67 // Keeps track of references to each tensor. 70 // There will be an entry in alloc_queue_ for the allocation of each tensor 172 TF_LITE_ENSURE_STATUS(CalculateTensorAllocation(alloc_info.tensor)); 174 TF_LITE_ENSURE_STATUS(CalculateTensorDeallocation(alloc_info.tensor)); 186 TfLiteTensor& tensor = *graph_info_->tensor(tensor_index); local 187 if (tensor.allocation_type == kTfLiteArenaRw) { 188 // Skip resolution if the size of the tensor is zero, leaving it as 203 TfLiteTensor& tensor = *graph_info_->tensor(tensor_index); local 218 TfLiteTensor& tensor = *graph_info_->tensor(tensor_index); local [all...] |
/external/tensorflow/tensorflow/contrib/lite/toco/ |
tensorflow_util.cc | 31 #include "tensorflow/core/framework/tensor.pb.h" 110 const auto& tensor = attr.second.tensor(); local 111 dump.append(" TENSOR:\n"); 113 tensorflow::DataType_Name(tensor.dtype())); 114 const auto& shape = tensor.tensor_shape(); 120 if (!tensor.tensor_content().empty()) { 122 tensor.tensor_content().size()); 124 if (tensor.dtype() == tensorflow::DT_INT32) { 125 CHECK_EQ(0, tensor.tensor_content().size() % sizeof(int32)) [all...] |
/external/tensorflow/tensorflow/core/kernels/ |
summary_tensor_op.cc | 20 #include "tensorflow/core/framework/tensor.pb.h" 34 const Tensor& tag = c->input(0); 37 const Tensor& tensor = c->input(1); variable 38 const Tensor& serialized_summary_metadata_tensor = c->input(2); 44 if (tensor.dtype() == DT_STRING) { 46 tensor.AsProtoField(v->mutable_tensor()); 48 tensor.AsProtoTensorContent(v->mutable_tensor()); 54 Tensor* summary_tensor = nullptr; 80 const Tensor& tensor = c->input(0) variable [all...] |
count_up_to_op.cc | 35 Tensor tensor = context->mutable_input(0, true); variable 36 OP_REQUIRES(context, TensorShapeUtils::IsScalar(tensor.shape()), 38 tensor.shape().DebugString())); 39 T* ptr = &tensor.scalar<T>()(); 48 Tensor* out_tensor; 74 Tensor before_increment = *variable->tensor(); 88 Tensor* tmp; 91 *variable->tensor() = *tmp [all...] |
parse_tensor_op.cc | 20 #include "tensorflow/core/framework/tensor.h" 21 #include "tensorflow/core/framework/tensor.pb.h" 35 const Tensor& serialized = ctx->input(0); 50 Tensor output; 56 errors::InvalidArgument("Type mismatch between parsed tensor (", 75 const Tensor& tensor = context->input(0); variable 77 if (tensor.dtype() == DT_STRING) { 78 tensor.AsProtoField(&proto); 80 tensor.AsProtoTensorContent(&proto) [all...] |
variable_ops.h | 41 Tensor* tensor() { return &tensor_; } function in class:tensorflow::Var 50 Tensor tensor_;
|
diag_op.cc | 27 #include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor" 30 #include "tensorflow/core/framework/tensor.h" 41 // Generate the diagonal tensor with the diagonal set to the input tensor. 48 const Tensor& diagonal = context->input(0); 60 Tensor* output_tensor = nullptr; 71 // Extract the diagonal tensor with the diagonal set to the input tensor. 78 const Tensor& tensor = context->input(0) variable [all...] |
summary_audio_op.cc | 40 const Tensor& tag = c->input(0); 41 const Tensor& tensor = c->input(1); variable 44 OP_REQUIRES(c, tensor.dims() >= 2 && tensor.dims() <= 3, 45 errors::InvalidArgument("Tensor must be 3-D or 2-D, got: ", 46 tensor.shape().DebugString())); 51 const Tensor& sample_rate_tensor = c->input(2); 57 const int batch_size = tensor.dim_size(0); 58 const int64 length_frames = tensor.dim_size(1) [all...] |
/external/eigen/unsupported/test/ |
cxx11_tensor_io.cpp | 13 #include <Eigen/CXX11/Tensor> 19 Tensor<int, 0, DataLayout> tensor; local 20 tensor() = 123; 23 os << tensor; local 33 Tensor<int, 1, DataLayout> tensor(5); 35 tensor(i) = i; 39 os << tensor; local 44 Eigen::Tensor<double,1,DataLayout> empty_tensor(0) 63 os << tensor; local 97 os << tensor; local [all...] |
cxx11_tensor_assign.cpp | 12 #include <Eigen/CXX11/Tensor> 14 using Eigen::Tensor; 19 Tensor<int, 1> vec1(6); 20 Tensor<int, 1, RowMajor> vec2(6); 32 TensorMap<Tensor<int, 1> > vec3(col_major, 6); 33 TensorMap<Tensor<int, 1, RowMajor> > vec4(row_major, 6); 74 Tensor<int, 2> mat1(2,3); 75 Tensor<int, 2, RowMajor> mat2(2,3); 95 TensorMap<Tensor<int, 2> > mat3(row_major, 2, 3); 96 TensorMap<Tensor<int, 2, RowMajor> > mat4(col_major, 2, 3) 263 Tensor<int, 1> tensor = start_tensor; local [all...] |
cxx11_tensor_chipping.cpp | 12 #include <Eigen/CXX11/Tensor> 14 using Eigen::Tensor; 19 Tensor<float, 5, DataLayout> tensor(2,3,5,7,11); 20 tensor.setRandom(); 22 Tensor<float, 4, DataLayout> chip1; 23 chip1 = tensor.template chip<0>(1); 34 VERIFY_IS_EQUAL(chip1(i,j,k,l), tensor(1,i,j,k,l)); 40 Tensor<float, 4, DataLayout> chip2 = tensor.template chip<1>(1) 224 Tensor<float, 5, DataLayout> tensor = input1; local [all...] |
/external/tensorflow/tensorflow/contrib/lite/kernels/ |
embedding_lookup_test.cc | 48 TfLiteTensor* tensor = interpreter_->tensor(weight_); local 49 int rows = tensor->dims->data[0]; 50 int columns = tensor->dims->data[1]; 51 int features = tensor->dims->data[2]; 55 tensor->data.f[(i * columns + j) * features + k] = function(i, j, k);
|
skip_gram_test.cc | 50 TfLiteTensor* tensor = interpreter_->tensor(output_); local 52 int num = GetStringCount(tensor); 54 StringRef strref = GetString(tensor, i);
|
embedding_lookup_sparse_test.cc | 63 TfLiteTensor* tensor = interpreter_->tensor(value_); local 64 int rows = tensor->dims->data[0]; 65 int columns = tensor->dims->data[1]; 66 int features = tensor->dims->data[2]; 70 tensor->data.f[(i * columns + j) * features + k] = function(i, j, k);
|
hashtable_lookup_test.cc | 61 TfLiteTensor* tensor = interpreter_->tensor(value_); local 62 int rows = tensor->dims->data[0]; 64 tensor->data.f[i] = function(i); 69 TfLiteTensor* tensor = interpreter_->tensor(value_); local 70 int rows = tensor->dims->data[0]; 71 int features = tensor->dims->data[1]; 74 tensor->data.f[i * features + j] = function(i, j); 80 TfLiteTensor* output = interpreter_->tensor(output_) [all...] |
/external/tensorflow/tensorflow/core/distributed_runtime/ |
tensor_coding.h | 20 #include "tensorflow/core/framework/tensor.h" 34 // into Tensor contents as well as associated metadata. 73 // Initialize tensor from *response. 77 // Initialize tensor metadata from response and allocate 81 // Return a reference to the parsed tensor. The tensor will remain 83 const Tensor& tensor() const { return tensor_; } function in class:tensorflow::TensorResponse 85 // Return a reference to the parsed tensor metadata (no contents). 101 Tensor tensor_ [all...] |
/external/tensorflow/tensorflow/python/kernel_tests/ |
tensor_priority_test.py | 38 tensor = ops.convert_to_tensor([[10.0, 20.0]]) variable in class:TensorPriorityTest.testSupportedRhsWithoutDelegation.NumpyArraySubclass 39 res = tensor + rhs 40 self.assertIsInstance(res, ops.Tensor) 47 tensor = ops.convert_to_tensor([[10.0, 20.0]]) 52 tensor + rhs 61 tensor = ops.convert_to_tensor([[10.0, 20.0]]) 63 res = tensor + rhs 79 tensor = ops.convert_to_tensor([[10.0, 20.0]]) 81 res = tensor + rhs
|
/external/tensorflow/tensorflow/cc/ops/ |
const_op_test.cc | 30 Tensor tensor; local 31 TF_EXPECT_OK(GetNodeAttr(n->attrs(), "value", &tensor)); 34 EXPECT_EQ(tensor.dtype(), dtype); 35 test::ExpectTensorEqual<T>(tensor, test::AsTensor(values, shape)); 41 Tensor tensor; local 42 TF_EXPECT_OK(GetNodeAttr(n->attrs(), "value", &tensor)); 46 EXPECT_EQ(expected_shape, TensorShape(tensor.shape()));
|
/external/tensorflow/tensorflow/contrib/lite/toco/tflite/ |
types_test.cc | 61 auto* tensor = local 62 flatbuffers::GetRoot<::tflite::Tensor>(builder.GetBufferPointer()); 65 DataBuffer::Deserialize(*tensor, *buffer, &result); 83 EXPECT_DEATH(DataType::Deserialize(t), "Unhandled tensor type."); 98 auto* tensor = local 99 flatbuffers::GetRoot<::tflite::Tensor>(builder.GetBufferPointer()); 106 DataBuffer::Deserialize(*tensor, *buffer, &array); 128 auto* tensor = local 129 flatbuffers::GetRoot<::tflite::Tensor>(builder.GetBufferPointer()); 131 EXPECT_DEATH(DataBuffer::Deserialize(*tensor, *buffer, &array) [all...] |
/external/tensorflow/tensorflow/contrib/gdr/ |
gdr_rendezvous_mgr.cc | 61 if (s.ok() && tensor().TotalBytes() > 0 && (!is_dead()) && dma_ok) { 67 const_cast<Tensor*>(&tensor()), transport_options, dst_device_, 103 const Tensor& tensor() const { return resp_.tensor(); } function in class:tensorflow::__anon39175::GdrRecvTensorCall 145 done(s, Args(), recv_args, Tensor{}, false); 153 done(s, Args(), recv_args, Tensor{}, false); 161 done(s, Args(), recv_args, Tensor{}, false); 181 done(s, Args(), call->recv_args(), call->tensor(), call->is_dead()) [all...] |
/external/tensorflow/tensorflow/contrib/lite/java/src/test/java/org/tensorflow/lite/ |
TensorTest.java | 27 /** Unit tests for {@link org.tensorflow.lite.Tensor}. */ 45 Tensor[] outputs = wrapper.run(inputs); 56 Tensor tensor = Tensor.fromHandle(nativeHandle); local 57 assertThat(tensor).isNotNull(); 59 assertThat(tensor.shapeCopy).isEqualTo(expectedShape); 60 assertThat(tensor.dtype).isEqualTo(DataType.FLOAT32); 65 Tensor tensor = Tensor.fromHandle(nativeHandle) local 75 Tensor tensor = Tensor.fromHandle(nativeHandle); local 92 Tensor tensor = Tensor.fromHandle(nativeHandle); local [all...] |