Home
last modified time | relevance | path

Searched refs:out_tensors (Results 1 – 25 of 110) sorted by relevance

12345

/external/tensorflow/tensorflow/core/common_runtime/
Dlower_case_op_test.cc138 std::vector<Tensor> out_tensors; in TEST() local
139 TF_ASSERT_OK(session.Run(feeds, {Output(written_if)}, &out_tensors)); in TEST()
140 EXPECT_EQ(out_tensors.size(), 1); in TEST()
141 EXPECT_EQ(out_tensors[0].scalar<int>()(), 160); in TEST()
147 std::vector<Tensor> out_tensors; in TEST() local
148 TF_ASSERT_OK(session.Run(feeds, {Output(written_if)}, &out_tensors)); in TEST()
149 EXPECT_EQ(out_tensors.size(), 1); in TEST()
150 EXPECT_EQ(out_tensors[0].scalar<int>()(), 20); in TEST()
156 std::vector<Tensor> out_tensors; in TEST() local
157 TF_ASSERT_OK(session.Run(feeds, {Output(written_if)}, &out_tensors)); in TEST()
[all …]
Dlower_if_op_test.cc134 std::vector<Tensor> out_tensors; in TEST() local
135 TF_ASSERT_OK(session.Run(feeds, {Output(written_if)}, &out_tensors)); in TEST()
136 EXPECT_EQ(out_tensors.size(), 1); in TEST()
137 EXPECT_EQ(out_tensors[0].scalar<int>()(), 40); in TEST()
143 std::vector<Tensor> out_tensors; in TEST() local
144 TF_ASSERT_OK(session.Run(feeds, {Output(written_if)}, &out_tensors)); in TEST()
145 EXPECT_EQ(out_tensors.size(), 1); in TEST()
146 EXPECT_EQ(out_tensors[0].scalar<int>()(), 20); in TEST()
242 std::vector<Tensor> out_tensors; in TEST() local
243 TF_ASSERT_OK(session.Run(feeds, {Output(read)}, &out_tensors)); in TEST()
[all …]
Dlower_functional_ops_test.cc186 std::vector<Tensor> out_tensors; in TEST() local
187 TF_ASSERT_OK(session.Run(feeds, {Output(while_node, 2)}, &out_tensors)); in TEST()
188 ASSERT_EQ(out_tensors.size(), 1); in TEST()
189 EXPECT_EQ(out_tensors[0].scalar<int>()(), 8); in TEST()
196 std::vector<Tensor> out_tensors; in TEST() local
197 TF_ASSERT_OK(session.Run(feeds, {Output(while_node, 2)}, &out_tensors)); in TEST()
198 ASSERT_EQ(out_tensors.size(), 1); in TEST()
199 EXPECT_EQ(out_tensors[0].scalar<int>()(), 64); // a in TEST()
312 std::vector<Tensor> out_tensors; in TEST() local
313 TF_ASSERT_OK(session.Run(feeds, {Output(if_node)}, &out_tensors)); in TEST()
[all …]
Dlower_while_op_test.cc159 std::vector<Tensor> out_tensors; in TEST() local
160 TF_ASSERT_OK(session.Run(feeds, {Output(while_node)}, &out_tensors)); in TEST()
161 ASSERT_EQ(out_tensors.size(), 1); in TEST()
162 EXPECT_EQ(out_tensors[0].scalar<int>()(), 16); in TEST()
167 std::vector<Tensor> out_tensors; in TEST() local
168 TF_ASSERT_OK(session.Run(feeds, {Output(while_node)}, &out_tensors)); in TEST()
169 ASSERT_EQ(out_tensors.size(), 1); in TEST()
170 EXPECT_EQ(out_tensors[0].scalar<int>()(), 12); in TEST()
495 std::vector<Tensor> out_tensors; in TEST() local
497 feeds, {Output(while_node, 0), Output(while_node, 1)}, &out_tensors)); in TEST()
[all …]
Dlower_function_call_op_test.cc129 std::vector<Tensor> out_tensors; in TEST() local
130 TF_ASSERT_OK(session.Run(feeds, {Output(b)}, &out_tensors)); in TEST()
131 EXPECT_EQ(out_tensors.size(), 1); in TEST()
132 EXPECT_EQ(out_tensors[0].scalar<int>()(), 100); in TEST()
194 std::vector<Tensor> out_tensors; in TEST() local
196 session.Run(feeds, {Output(tpu_call), Output(xla_call)}, &out_tensors)); in TEST()
197 EXPECT_EQ(out_tensors.size(), 2); in TEST()
198 EXPECT_EQ(out_tensors[0].scalar<int>()(), 20); in TEST()
199 EXPECT_EQ(out_tensors[1].scalar<int>()(), 20); in TEST()
/external/tensorflow/tensorflow/lite/python/
Dconvert_saved_model_test.py93 graph_def, in_tensors, out_tensors, _ = (
101 return graph_def, in_tensors, out_tensors
106 _, in_tensors, out_tensors = self._convertSavedModel(saved_model_dir)
108 self.assertEqual(self._getArrayNames(out_tensors), ["add:0"])
115 _, in_tensors, out_tensors = self._convertSavedModel(saved_model_dir)
117 self.assertEqual(self._getArrayNames(out_tensors), ["add:0"])
158 _, in_tensors, out_tensors = self._convertSavedModel(
163 self.assertEqual(self._getArrayNames(out_tensors), ["add:0"])
170 _, in_tensors, out_tensors = self._convertSavedModel(
175 self.assertEqual(self._getArrayNames(out_tensors), ["add:0"])
[all …]
/external/tensorflow/tensorflow/core/kernels/data/
Dtensor_dataset_op_test.cc127 std::vector<Tensor> out_tensors; in TEST_P() local
129 TF_EXPECT_OK(iterator_->GetNext(iterator_ctx_.get(), &out_tensors, in TEST_P()
132 EXPECT_EQ(out_tensors.size(), test_case.expected_outputs.size()); in TEST_P()
133 for (int i = 0; i < out_tensors.size(); ++i) { in TEST_P()
134 if (out_tensors[i].dtype() == DT_VARIANT) { in TEST_P()
137 const Tensor* output = out_tensors[i].scalar<Variant>()().get<Tensor>(); in TEST_P()
142 TF_EXPECT_OK(ExpectEqual(out_tensors[i], test_case.expected_outputs[i])); in TEST_P()
233 std::vector<Tensor> out_tensors; in TEST_P() local
251 out_tensors.insert(out_tensors.end(), next.begin(), next.end()); in TEST_P()
262 EXPECT_EQ(out_tensors.size(), test_case.expected_outputs.size()); in TEST_P()
[all …]
Dcache_dataset_ops_test.cc173 std::vector<Tensor> out_tensors; in TEST_P() local
178 out_tensors.insert(out_tensors.end(), next.begin(), next.end()); in TEST_P()
180 TF_EXPECT_OK(ExpectEqual(out_tensors, test_case.expected_outputs, in TEST_P()
188 out_tensors.clear(); in TEST_P()
193 out_tensors.insert(out_tensors.end(), next.begin(), next.end()); in TEST_P()
195 TF_EXPECT_OK(ExpectEqual(out_tensors, test_case.expected_outputs, in TEST_P()
314 std::vector<Tensor> out_tensors; in TEST_P() local
319 TF_EXPECT_OK(iterator_->GetNext(iterator_ctx_.get(), &out_tensors, in TEST_P()
323 out_tensors.clear(); in TEST_P()
344 out_tensors.clear(); in TEST_P()
[all …]
Dtensor_slice_dataset_op_test.cc107 std::vector<Tensor> out_tensors; in TEST_P() local
111 TF_EXPECT_OK(iterator_->GetNext(iterator_ctx_.get(), &out_tensors, in TEST_P()
113 for (int i = 0; i < out_tensors.size(); ++i) { in TEST_P()
116 if (out_tensors[i].dtype() == DT_VARIANT) { in TEST_P()
119 const Tensor* output = out_tensors[i].scalar<Variant>()().get<Tensor>(); in TEST_P()
127 out_tensors[i], in TEST_P()
131 out_tensors.clear(); in TEST_P()
274 std::vector<Tensor> out_tensors; in TEST_P() local
278 TF_EXPECT_OK(iterator_->GetNext(iterator_ctx_.get(), &out_tensors, in TEST_P()
286 for (int i = 0; i < out_tensors.size(); ++i) { in TEST_P()
[all …]
Dsparse_tensor_slice_dataset_op_test.cc169 std::vector<Tensor> out_tensors; in TEST_P() local
172 TF_EXPECT_OK(iterator_->GetNext(iterator_ctx_.get(), &out_tensors, in TEST_P()
175 TF_EXPECT_OK(ExpectEqual(out_tensors[0], expected_outputs_it->at(0))); in TEST_P()
176 TF_EXPECT_OK(ExpectEqual(out_tensors[1], expected_outputs_it->at(1))); in TEST_P()
177 TF_EXPECT_OK(ExpectEqual(out_tensors[2], expected_outputs_it->at(2))); in TEST_P()
377 std::vector<Tensor> out_tensors; in TEST_P() local
381 TF_EXPECT_OK(iterator_->GetNext(iterator_ctx_.get(), &out_tensors, in TEST_P()
389 for (int i = 0; i < out_tensors.size(); ++i) { in TEST_P()
391 out_tensors[0], test_case.expected_outputs[cur_iteration - 1][0])); in TEST_P()
393 out_tensors[1], test_case.expected_outputs[cur_iteration - 1][1])); in TEST_P()
[all …]
Drepeat_dataset_op_test.cc139 std::vector<Tensor> out_tensors; in TEST_P() local
144 out_tensors.clear(); in TEST_P()
145 TF_EXPECT_OK(iterator_->GetNext(iterator_ctx_.get(), &out_tensors, in TEST_P()
147 for (const auto& tensor : out_tensors) { in TEST_P()
161 TF_EXPECT_OK(iterator_->GetNext(iterator_ctx_.get(), &out_tensors, in TEST_P()
164 for (const auto& tensor : out_tensors) { in TEST_P()
317 std::vector<Tensor> out_tensors; in TEST_P() local
331 out_tensors.clear(); in TEST_P()
332 TF_EXPECT_OK(iterator_->GetNext(iterator_ctx_.get(), &out_tensors, in TEST_P()
335 for (auto& tensor : out_tensors) { in TEST_P()
Dsparse_tensor_slice_dataset_op.cc103 std::vector<Tensor>* out_tensors, in GetNextInternal() argument
111 out_tensors->clear(); in GetNextInternal()
112 out_tensors->reserve(3); in GetNextInternal()
144 out_tensors->push_back(std::move(next_indices_)); in GetNextInternal()
145 out_tensors->push_back(std::move(next_values_)); in GetNextInternal()
146 out_tensors->push_back(dense_shape_); in GetNextInternal()
152 out_tensors->push_back(Tensor(DT_INT64, TensorShape({0, rank - 1}))); in GetNextInternal()
153 out_tensors->push_back(Tensor(DataTypeToEnum<T>::value, {0})); in GetNextInternal()
154 out_tensors->push_back(dense_shape_); in GetNextInternal()
Dcache_dataset_ops.cc157 std::vector<Tensor>* out_tensors, in GetNextInternal() argument
160 return iterator_->GetNext(ctx, out_tensors, end_of_sequence); in GetNextInternal()
257 std::vector<Tensor>* out_tensors, in GetNextInternal() argument
278 input_impl_->GetNext(ctx, out_tensors, end_of_sequence)); in GetNextInternal()
279 if (*end_of_sequence && out_tensors->empty()) { in GetNextInternal()
284 if (out_tensors->size() != dataset()->num_tensors_) { in GetNextInternal()
288 dataset()->num_tensors_, " got: ", out_tensors->size()); in GetNextInternal()
291 for (const Tensor& t : *out_tensors) { in GetNextInternal()
498 std::vector<Tensor>* out_tensors, in GetNextInternal() argument
507 out_tensors->clear(); in GetNextInternal()
[all …]
Dzip_dataset_op.cc138 std::vector<Tensor>* out_tensors, in GetNextInternal() argument
145 out_tensors->clear(); in GetNextInternal()
146 out_tensors->reserve(dataset()->output_dtypes().size()); in GetNextInternal()
163 out_tensors->insert(out_tensors->end(), input_tensors.begin(), in GetNextInternal()
167 out_tensors->clear(); in GetNextInternal()
Dtensor_slice_dataset_op.cc126 std::vector<Tensor>* out_tensors, in GetNextInternal() argument
134 out_tensors->clear(); in GetNextInternal()
135 out_tensors->reserve(dataset()->tensors_.size()); in GetNextInternal()
138 out_tensors->emplace_back(ctx->allocator({}), t.dtype(), in GetNextInternal()
141 batch_util::CopySliceToElement(t, &out_tensors->back(), index)); in GetNextInternal()
Drepeat_dataset_op.cc119 std::vector<Tensor>* out_tensors, in GetNextInternal() argument
152 std::vector<Tensor>* out_tensors, in GetNextInternal() argument
161 input_impl_->GetNext(ctx, out_tensors, end_of_sequence)); in GetNextInternal()
227 std::vector<Tensor>* out_tensors, in GetNextInternal() argument
235 Status s = input_impl_->GetNext(ctx, out_tensors, end_of_sequence); in GetNextInternal()
236 DCHECK(!*end_of_sequence || out_tensors->empty()); in GetNextInternal()
/external/tensorflow/tensorflow/core/kernels/
Dfused_batch_norm_ex_op_test.cc202 std::vector<Tensor> out_tensors; in RunFusedBatchNorm() local
209 &out_tensors, /*allow_gpu_device=*/true); in RunFusedBatchNorm()
211 forward->y = out_tensors[0]; in RunFusedBatchNorm()
212 forward->batch_mean = out_tensors[1]; in RunFusedBatchNorm()
213 forward->batch_variance = out_tensors[2]; in RunFusedBatchNorm()
214 forward->reserve_space_1 = out_tensors[3]; in RunFusedBatchNorm()
215 forward->reserve_space_2 = out_tensors[4]; in RunFusedBatchNorm()
216 forward->reserve_space_3 = out_tensors[5]; in RunFusedBatchNorm()
218 backward->y_backprop = out_tensors[6]; in RunFusedBatchNorm()
219 backward->x_backprop = out_tensors[7]; in RunFusedBatchNorm()
[all …]
/external/tensorflow/tensorflow/core/kernels/data/experimental/
Dcsv_dataset_op.cc276 std::vector<Tensor>* out_tensors, in GetNextInternal() argument
285 ReadRecord(ctx, out_tensors, select_all, in GetNextInternal()
289 if (out_tensors->size() != dataset()->out_type_.size()) { in GetNextInternal()
292 out_tensors->size(), " in record"); in GetNextInternal()
389 Status ReadRecord(IteratorContext* ctx, std::vector<Tensor>* out_tensors, in ReadRecord() argument
420 ParseOneField(ctx, out_tensors, &end_of_record, include)); in ReadRecord()
434 std::vector<Tensor>* out_tensors, in ParseOneField() argument
446 return FieldToOutput(ctx, StringPiece(), out_tensors); in ParseOneField()
458 return ParseQuotedField(ctx, out_tensors, end_of_record, include); in ParseOneField()
461 return ParseUnquotedField(ctx, out_tensors, end_of_record, include); in ParseOneField()
[all …]
Drebatch_dataset_op.cc125 std::vector<Tensor>* out_tensors, in GetNextInternal() argument
156 out_tensors->reserve(input_descriptors_.size()); in GetNextInternal()
173 out_tensors->push_back(std::move(slice)); in GetNextInternal()
175 out_tensors->push_back(tensor::DeepCopy(std::move(slice))); in GetNextInternal()
382 std::vector<Tensor>* out_tensors, in GetNextInternal() argument
446 out_tensors->reserve(num_components); in GetNextInternal()
458 out_tensors->push_back(Tensor(dataset()->output_dtypes()[i])); in GetNextInternal()
473 out_tensors->push_back( in GetNextInternal()
490 *out_tensors = std::move(tensors); in GetNextInternal()
500 out_tensors->emplace_back(ctx->allocator({}), in GetNextInternal()
[all …]
Drandom_dataset_op_test.cc128 std::vector<Tensor> out_tensors; in TEST_P() local
129 while (out_tensors.size() < test_case.expected_outputs.size()) { in TEST_P()
136 out_tensors.insert(out_tensors.end(), next.begin(), next.end()); in TEST_P()
139 TF_ASSERT_OK(ExpectEqual(out_tensors, test_case.expected_outputs, in TEST_P()
Dignore_errors_dataset_op.cc105 std::vector<Tensor>* out_tensors, in GetNextInternal() argument
114 s = input_impl_->GetNext(ctx, out_tensors, end_of_sequence); in GetNextInternal()
120 out_tensors->clear(); in GetNextInternal()
121 s = input_impl_->GetNext(ctx, out_tensors, end_of_sequence); in GetNextInternal()
Dunique_dataset_op.cc87 std::vector<Tensor>* out_tensors, in GetNextInternal() argument
93 out_tensors->clear(); in GetNextInternal()
95 input_impl_->GetNext(ctx, out_tensors, end_of_sequence)); in GetNextInternal()
99 DCHECK_EQ(1, out_tensors->size()); in GetNextInternal()
100 saw_new_value = unique_elements_.insert((*out_tensors)[0]).second; in GetNextInternal()
Dsql_dataset_op.cc144 std::vector<Tensor>* out_tensors, in GetNextInternal() argument
154 query_connection_->GetNext(ctx, out_tensors, &end_of_sequence_); in GetNextInternal()
184 std::vector<Tensor> out_tensors; in RestoreInternal() local
187 TF_RETURN_IF_ERROR(query_connection_->GetNext(ctx, &out_tensors, in RestoreInternal()
189 out_tensors.clear(); in RestoreInternal()
/external/tensorflow/tensorflow/cc/ops/
Dwhile_loop_test.cc59 std::vector<Tensor> out_tensors; in Run() local
60 TF_ASSERT_OK(session.Run(feeds, outputs_, &out_tensors)); in Run()
61 ASSERT_EQ(out_tensors.size(), outputs_.size()); in Run()
63 DCHECK_EQ(expected_output_values.size(), out_tensors.size()); in Run()
64 for (int i = 0; i < out_tensors.size(); ++i) { in Run()
66 out_tensors[i], test::AsTensor<T>({expected_output_values[i]}, {})); in Run()
/external/tensorflow/tensorflow/cc/framework/
Dwhile_gradients_test.cc73 std::vector<Tensor> out_tensors; in Run() local
75 &out_tensors, run_metadata)); in Run()
76 ASSERT_EQ(out_tensors.size(), grad_outputs_.size()); in Run()
78 DCHECK_EQ(expected_grad_values.size(), out_tensors.size()); in Run()
79 for (int i = 0; i < out_tensors.size(); ++i) { in Run()
81 out_tensors[i], test::AsTensor<T>({expected_grad_values[i]}, {})); in Run()

12345