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

Function TestCase7

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

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

Source from the content-addressed store, hash-verified

230
231// test case 7: cycle_length = 2, block_length = 5.
232TestCase TestCase7() {
233 return {/*input_tensors*/
234 {CreateTensor<tstring>(TensorShape{3, 3, 1}, {"a", "b", "c", "d", "e",
235 "f", "g", "h", "i"})},
236 /*func*/
237 MakeTensorSliceDatasetFunc(
238 DataTypeVector({DT_STRING}),
239 std::vector<PartialTensorShape>({PartialTensorShape({1})})),
240 /*func_lib*/ {test::function::MakeTensorSliceDataset()},
241 /*cycle_length*/
242 CreateTensor<int64>(TensorShape({}), {2}),
243 /*block_length*/
244 CreateTensor<int64>(TensorShape({}), {5}),
245 /*expected_outputs*/
246 ConvertToTensorVec<tstring>(
247 {"a", "b", "c", "d", "e", "f", "g", "h", "i"}),
248 /*expected_output_dtypes*/ {DT_STRING},
249 /*expected_output_shapes*/ {PartialTensorShape({1})},
250 /*expected_cardinality*/ tensorflow::data::kUnknownCardinality,
251 /*breakpoints*/ {0, 4, 11}};
252}
253
254// test case 8: cycle_length = 0, block_length = 5.
255TestCase InvalidCycleLengthTestCase() {

Callers 1

Calls 4

PartialTensorShapeClass · 0.85
MakeTensorSliceDatasetFunction · 0.85
TensorShapeClass · 0.50

Tested by

no test coverage detected