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

Function TestCase6

tensorflow/core/kernels/data/interleave_dataset_op_test.cc:209–229  ·  view source on GitHub ↗

test case 6: cycle_length = 2, block_length = 3.

Source from the content-addressed store, hash-verified

207
208// test case 6: cycle_length = 2, block_length = 3.
209TestCase TestCase6() {
210 return {/*input_tensors*/
211 {CreateTensor<tstring>(TensorShape{3, 3, 1}, {"a", "b", "c", "d", "e",
212 "f", "g", "h", "i"})},
213 /*func*/
214 MakeTensorSliceDatasetFunc(
215 DataTypeVector({DT_STRING}),
216 std::vector<PartialTensorShape>({PartialTensorShape({1})})),
217 /*func_lib*/ {test::function::MakeTensorSliceDataset()},
218 /*cycle_length*/
219 CreateTensor<int64>(TensorShape({}), {2}),
220 /*block_length*/
221 CreateTensor<int64>(TensorShape({}), {3}),
222 /*expected_outputs*/
223 ConvertToTensorVec<tstring>(
224 {"a", "b", "c", "d", "e", "f", "g", "h", "i"}),
225 /*expected_output_dtypes*/ {DT_STRING},
226 /*expected_output_shapes*/ {PartialTensorShape({1})},
227 /*expected_cardinality*/ tensorflow::data::kUnknownCardinality,
228 /*breakpoints*/ {0, 4, 11}};
229}
230
231// test case 7: cycle_length = 2, block_length = 5.
232TestCase TestCase7() {

Callers 1

Calls 4

PartialTensorShapeClass · 0.85
MakeTensorSliceDatasetFunction · 0.85
TensorShapeClass · 0.50

Tested by

no test coverage detected