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

Function TestCase5

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

test case 5: cycle_length = 2, block_length = 2.

Source from the content-addressed store, hash-verified

184
185// test case 5: cycle_length = 2, block_length = 2.
186TestCase TestCase5() {
187 return {/*input_tensors*/
188 {CreateTensor<tstring>(TensorShape{3, 3, 1}, {"a", "b", "c", "d", "e",
189 "f", "g", "h", "i"})},
190 /*func*/
191 MakeTensorSliceDatasetFunc(
192 DataTypeVector({DT_STRING}),
193 std::vector<PartialTensorShape>({PartialTensorShape({1})})),
194 /*func_lib*/ {test::function::MakeTensorSliceDataset()},
195 /*cycle_length*/
196 CreateTensor<int64>(TensorShape({}), {2}),
197 /*block_length*/
198 CreateTensor<int64>(TensorShape({}), {2}),
199 /*expected_outputs*/
200 ConvertToTensorVec<tstring>(
201 {"a", "b", "d", "e", "c", "f", "g", "h", "i"}),
202 /*expected_output_dtypes*/ {DT_STRING},
203 /*expected_output_shapes*/ {PartialTensorShape({1})},
204 /*expected_cardinality*/ tensorflow::data::kUnknownCardinality,
205 /*breakpoints*/ {0, 4, 11}};
206}
207
208// test case 6: cycle_length = 2, block_length = 3.
209TestCase TestCase6() {

Callers 1

Calls 4

PartialTensorShapeClass · 0.85
MakeTensorSliceDatasetFunction · 0.85
TensorShapeClass · 0.50

Tested by

no test coverage detected