MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST_F

Function TEST_F

tensorflow/core/kernels/data/tensor_dataset_op_test.cc:172–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172TEST_F(TensorDatasetOpTest, DatasetTypeString) {
173 int thread_num = 2, cpu_num = 2;
174 TF_ASSERT_OK(InitThreadPool(thread_num));
175 TF_ASSERT_OK(InitFunctionLibraryRuntime({}, cpu_num));
176
177 const TestCase &test_case = PlainTensorsTestCase();
178 std::vector<Tensor> components = test_case.components;
179 gtl::InlinedVector<TensorValue, 4> inputs;
180 for (auto &component : components) {
181 inputs.push_back(TensorValue(&component));
182 }
183 std::unique_ptr<OpKernel> tensor_dataset_kernel;
184 TF_ASSERT_OK(CreateTensorDatasetKernel(test_case.expected_output_dtypes,
185 test_case.expected_output_shapes,
186 &tensor_dataset_kernel));
187 std::unique_ptr<OpKernelContext> tensor_dataset_context;
188 TF_ASSERT_OK(CreateTensorDatasetContext(tensor_dataset_kernel.get(), &inputs,
189 &tensor_dataset_context));
190 DatasetBase *tensor_dataset;
191 TF_ASSERT_OK(CreateDataset(tensor_dataset_kernel.get(),
192 tensor_dataset_context.get(), &tensor_dataset));
193 core::ScopedUnref scoped_unref(tensor_dataset);
194
195 EXPECT_EQ(tensor_dataset->type_string(),
196 name_utils::OpName(TensorDatasetOp::kDatasetType));
197}
198
199TEST_F(TensorDatasetOpTest, DatasetNodeName) {
200 int thread_num = 2, cpu_num = 2;

Callers

nothing calls this directly

Calls 14

PlainTensorsTestCaseFunction · 0.85
TensorValueClass · 0.85
IteratorPrefixFunction · 0.85
prefixMethod · 0.80
OpNameFunction · 0.70
push_backMethod · 0.45
getMethod · 0.45
node_nameMethod · 0.45
output_dtypesMethod · 0.45
sizeMethod · 0.45
output_shapesMethod · 0.45
IsIdenticalToMethod · 0.45

Tested by

no test coverage detected