/external/tensorflow/tensorflow/core/framework/ |
H A D | unique_tensor_references_test.cc | 32 TensorReferenceVector tensors; local 33 refs.FreezeAndReturnReferences(&tensors); 34 EXPECT_EQ(2, tensors.size()); 35 if (tensors[0].SharesBufferWith(a)) { 36 EXPECT_TRUE(tensors[1].SharesBufferWith(b)); 38 EXPECT_TRUE(tensors[1].SharesBufferWith(a)); 39 EXPECT_TRUE(tensors[0].SharesBufferWith(b)); 41 for (auto& t : tensors) { 55 TensorReferenceVector tensors; local 56 refs.FreezeAndReturnReferences(&tensors); 91 TensorReferenceVector tensors; local 116 TensorReferenceVector tensors; local [all...] |
H A D | tensor_util.cc | 48 Status Concat(const gtl::ArraySlice<Tensor>& tensors, Tensor* result) { argument 49 if (tensors.empty()) { 50 return errors::InvalidArgument("Cannot concatenate zero tensors"); 53 for (const Tensor& tensor : tensors) { 60 TensorShape shape = tensors[0].shape(); 63 const DataType dtype = tensors[0].dtype(); 64 for (int i = 1; i < tensors.size(); ++i) { 65 if (tensors[i].dtype() != dtype) { 67 "Cannot concatenate tensors that have different data types"); 79 for (const Tensor& tensor : tensors) { [all...] |
H A D | variant_tensor_data.cc | 33 const Tensor& VariantTensorData::tensors(int index) const { function in class:tensorflow::VariantTensorData 37 const std::vector<Tensor>& VariantTensorData::tensors() const { function in class:tensorflow::VariantTensorData 58 for (const auto& tensor : proto.tensors()) { 89 strings::StrCat(repeated_field, " tensors: ", t.DebugString());
|
/external/tensorflow/tensorflow/cc/framework/ |
H A D | testutil.cc | 27 void GetTensors(const Scope& scope, OutputList tensors, argument 30 TF_CHECK_OK(session.Run(tensors, out)); 40 const OutputList& tensors, std::vector<Tensor>* out) { 43 TF_CHECK_OK(session.Run(tensors, out)); 39 GetTensors(const Scope& scope, const std::vector<Output>& assign_vars, const OutputList& tensors, std::vector<Tensor>* out) argument
|
/external/tensorflow/tensorflow/contrib/lite/toco/tflite/ |
H A D | export_test.cc | 58 details::TensorsMap tensors; local 59 details::LoadTensorsMap(input_model_, &tensors); 60 EXPECT_EQ(0, tensors["tensor_one"]); 61 EXPECT_EQ(1, tensors["tensor_two"]); 107 // TODO(ahentz): tests for tensors, inputs, outpus, opcodes and operators.
|
H A D | import_test.cc | 43 // The tensors 65 auto tensors = builder_.CreateVector( local 77 auto subgraph = ::tflite::CreateSubGraph(builder_, tensors, 0, 0, 0); 99 details::TensorsTable tensors; local 100 details::LoadTensorsTable(*input_model_, &tensors); 101 EXPECT_THAT(tensors, ElementsAre("tensor_one", "tensor_two"));
|
H A D | import.cc | 31 auto tensors = (*input_model.subgraphs())[0]->tensors(); local 32 if (!tensors) return; 33 for (const auto* tensor : *tensors) { 54 auto tensors = (*input_model.subgraphs())[0]->tensors(); local 56 // auto tensors = input_model.tensors(); 57 if (!tensors) return; 58 for (const auto* input_tensor : *tensors) { [all...] |
/external/tensorflow/tensorflow/core/kernels/data/ |
H A D | tensor_dataset_op.cc | 35 // TODO(mrry): Validate that the shapes of the "components" tensors match 48 Dataset(OpKernelContext* ctx, std::vector<Tensor> tensors) argument 49 : GraphDatasetBase(ctx), tensors_(std::move(tensors)) {
|
H A D | tensor_slice_dataset_op.cc | 59 explicit Dataset(OpKernelContext* ctx, std::vector<Tensor> tensors) argument 60 : GraphDatasetBase(ctx), tensors_(std::move(tensors)) {
|
/external/tensorflow/tensorflow/core/kernels/ |
H A D | merge_v2_checkpoints_op_test.cc | 37 gtl::ArraySlice<Tensor> tensors) { 39 ASSERT_TRUE(names.size() == tensors.size()); 41 TF_ASSERT_OK(writer.Add(names[i], tensors[i])); 94 // We expect to find all saved tensors. 36 WriteCheckpoint(const string& prefix, gtl::ArraySlice<string> names, gtl::ArraySlice<Tensor> tensors) argument
|
H A D | list_kernels.h | 37 // Variant compatible type for a list of tensors. This is mutable but instances 54 std::vector<Tensor> tensors; member in struct:tensorflow::TensorList 88 OP_REQUIRES(c, l->tensors.size() == num_elements_, 92 l->tensors.size(), " elements.")); 95 resulting_shape.AddDim(l->tensors.size()); 106 inputs_flat.reserve(l->tensors.size()); 107 for (const auto& t : l->tensors) { 155 output_list.tensors.reserve(t.shape().dim_size(0)); 163 output_list.tensors.push_back(tmp); 169 output_list.tensors [all...] |
H A D | serialize_sparse_op.cc | 413 std::vector<SparseTensor> tensors; variable 414 tensors.reserve(num_sparse_tensors); 416 tensors.emplace_back(indices[i], values[i], shape, std_order); 422 maybe_output = SparseTensor::Concat<T>(tensors); \
|
/external/tensorflow/tensorflow/core/common_runtime/gpu/ |
H A D | gpu_event_mgr.cc | 96 const TensorReferenceVector& tensors) { 105 for (const auto& t : tensors) { 95 ThenDeleteTensors(perftools::gputools::Stream* stream, const TensorReferenceVector& tensors) argument
|
H A D | gpu_event_mgr_test.cc | 51 TensorReferenceVector* tensors) { 53 em_->QueueTensors(stream, tensors); 182 th.PollEvents(false); // Harvest the tensors ready to be freed. 224 // Some of the tensors at least should be flushed 50 QueueTensors(perftools::gputools::Stream* stream, TensorReferenceVector* tensors) argument
|
/external/tensorflow/tensorflow/core/grappler/costs/ |
H A D | graph_memory_test.cc | 58 std::set<string> tensors; local 60 tensors.insert(strings::StrCat(t.node, ":", t.output_id)); 64 // the order in which this takes place, in the worst case the 3 tensors are in 70 EXPECT_EQ(expected, tensors); 88 std::set<string> tensors; local 90 tensors.insert(strings::StrCat(t.node, ":", t.output_id)); 96 EXPECT_EQ(expected, tensors); 215 std::set<string> tensors; local 217 tensors.insert(strings::StrCat(t.node, ":", t.output_id)); 223 EXPECT_EQ(expected, tensors); [all...] |
/external/tensorflow/tensorflow/contrib/lite/tools/ |
H A D | verifier_test.cc | 190 auto tensors = builder.CreateVector(std::vector<Offset<Tensor>>{ local 194 {CreateSubGraph(builder, tensors, /*inputs=*/0, /*outputs=*/0,
|
/external/tensorflow/tensorflow/core/common_runtime/ |
H A D | device.h | 92 // Takes ownership of the references in tensors. If necessary, a 94 // accessed tensors until the async computation has completed. 96 DeviceContext* context, const TensorReferenceVector& tensors) { 97 for (const auto& ref : tensors) { 95 ConsumeListOfAccessedTensors( DeviceContext* context, const TensorReferenceVector& tensors) argument
|
/external/tensorflow/tensorflow/contrib/lite/ |
H A D | arena_planner_test.cc | 100 std::vector<TfLiteTensor>* tensors() { return &tensors_; } function in class:tflite::__anon25861::TestGraph 116 size_t num_tensors() const override { return graph_->tensors()->size(); } 118 return &graph_->tensors()->at(index); 161 const TfLiteTensor& tensor = (*graph_->tensors())[tensor_index]; 168 const TfLiteTensor& tensor = (*graph_->tensors())[tensor_index]; 196 EXPECT_TRUE((*graph.tensors())[5].data.raw == nullptr); 197 EXPECT_TRUE((*graph.tensors())[11].data.raw == nullptr); 210 (*graph.tensors())[1].bytes = 0; 293 (*graph.tensors())[1].bytes = 40; 318 (*graph.tensors())[ [all...] |
H A D | context.h | 23 // TfLiteContext - allows an op to access the tensors 64 // Check if two tensors are equal. Returns 1 if they are equal, 0 otherwise. 156 // data. kTfLiteDynamic is for tensors that are allocated during evaluation. 215 // Inputs to this node expressed as indices into the simulator's tensors. 218 // Outputs to this node expressed as indices into the simulator's tensors. 221 // Temporary tensors uses during the computations. This usually contains no 222 // tensors, but ops are allowed to change that if they need scratch space of 240 // Number of tensors in the context. 261 // An tensor of tensors in the interpreter context (of length `tensors_size`) 262 TfLiteTensor* tensors; member in struct:TfLiteContext [all...] |
H A D | model.cc | 622 const flatbuffers::Vector<flatbuffers::Offset<Tensor>>* tensors, 634 for (int i = 0; i < tensors->Length(); ++i) { 635 const auto* tensor = tensors->Get(i); 762 // Construct interpreter with correct number of tensors and operators. 771 auto tensors = subgraph->tensors(); local 772 if (!operators || !tensors || !buffers) { 774 "Did not get operators, tensors, or buffers in input flat buffer.\n"); 778 if ((**interpreter).AddTensors(tensors->Length()) != kTfLiteOk) { 786 // Finally setup nodes and tensors 620 ParseTensors( const flatbuffers::Vector<flatbuffers::Offset<Buffer>>* buffers, const flatbuffers::Vector<flatbuffers::Offset<Tensor>>* tensors, Interpreter* interpreter) argument [all...] |
/external/tensorflow/tensorflow/contrib/lite/kernels/ |
H A D | test_util.cc | 83 // Initialize buffers list with empty buffer to allow for non-const tensors. 159 auto tensors = builder_.CreateVector(tensors_); local 164 auto subgraph = CreateSubGraph(builder_, tensors, inputs, outputs, operators); 194 << "Cannot allocate tensors";
|
/external/tensorflow/tensorflow/core/debug/ |
H A D | debug_grpc_io_utils_test.cc | 182 // Prepare the tensors to sent. 183 std::vector<Tensor> tensors; local 187 tensors.push_back(tensor); 202 auto fn = [this, &mu, &tensor_count, &tensors, &statuses, &all_done, 210 // Different concurrent tasks will send different tensors. 216 tensors[this_count], wall_time, urls); 245 // One prep tensor plus kSends concurrent tensors are expected.
|
H A D | grpc_session_debug_test.cc | 120 void LoadTensorDumps(const string& subdir, std::vector<Tensor>* tensors) { argument 135 tensors->push_back(tensor);
|
/external/tensorflow/tensorflow/core/grappler/optimizers/ |
H A D | memory_optimizer_test.cc | 390 auto tensors = EvaluateNodes(output, fetch); local 391 EXPECT_EQ(4, tensors.size()); 393 for (int i = 0; i < tensors[0].NumElements(); ++i) { 394 float actual = tensors[3].flat<float>()(i); 397 expected += tensors[j].flat<float>()(i);
|
/external/tensorflow/tensorflow/c/eager/ |
H A D | tape.h | 63 // Operations the tape needs to perform on tensors to do backpropagation. Named 90 // Consumes references to the tensors in the gradient_tensors list and returns 123 // functions (and hence the tensors they keep alive). Instead, everything 146 // once) and produces the gradient of the target tensors with respect to the 147 // source tensors. The output gradients are used if not empty and not 203 std::vector<TapeTensor> tensors; local 204 tensors.reserve(output_tensors.size()); 210 tensors.push_back(o); 213 op_type, tensors, ids, backward_function, backward_function_deleter}; 233 // Do not delete watched tensors [all...] |