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

Function TestCase4

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

test case 4: cycle_length = 5, block_length = 1.

Source from the content-addressed store, hash-verified

162
163// test case 4: cycle_length = 5, block_length = 1.
164TestCase TestCase4() {
165 return {
166 /*input_tensors*/
167 {CreateTensor<int64>(TensorShape{3, 3, 1}, {0, 1, 2, 3, 4, 5, 6, 7, 8})},
168 /*func*/
169 MakeTensorSliceDatasetFunc(
170 DataTypeVector({DT_INT64}),
171 std::vector<PartialTensorShape>({PartialTensorShape({1})})),
172 /*func_lib*/ {test::function::MakeTensorSliceDataset()},
173 /*cycle_length*/
174 CreateTensor<int64>(TensorShape({}), {3}),
175 /*block_length*/
176 CreateTensor<int64>(TensorShape({}), {1}),
177 /*expected_outputs*/
178 ConvertToTensorVec<int64>({0, 3, 6, 1, 4, 7, 2, 5, 8}),
179 /*expected_output_dtypes*/ {DT_INT64},
180 /*expected_output_shapes*/ {PartialTensorShape({1})},
181 /*expected_cardinality*/ tensorflow::data::kUnknownCardinality,
182 /*breakpoints*/ {0, 4, 11}};
183}
184
185// test case 5: cycle_length = 2, block_length = 2.
186TestCase TestCase5() {

Callers 1

Calls 4

PartialTensorShapeClass · 0.85
MakeTensorSliceDatasetFunction · 0.85
TensorShapeClass · 0.50

Tested by

no test coverage detected