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

Function TestCase2

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

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

Source from the content-addressed store, hash-verified

118
119// test case 2: cycle_length = 2, block_length = 1.
120TestCase TestCase2() {
121 return {
122 /*input_tensors*/
123 {CreateTensor<int64>(TensorShape{3, 3, 1}, {0, 1, 2, 3, 4, 5, 6, 7, 8})},
124 /*func*/
125 MakeTensorSliceDatasetFunc(
126 DataTypeVector({DT_INT64}),
127 std::vector<PartialTensorShape>({PartialTensorShape({1})})),
128 /*func_lib*/ {test::function::MakeTensorSliceDataset()},
129 /*cycle_length*/
130 CreateTensor<int64>(TensorShape({}), {2}),
131 /*block_length*/
132 CreateTensor<int64>(TensorShape({}), {1}),
133 /*expected_outputs*/
134 ConvertToTensorVec<int64>({0, 3, 1, 4, 2, 5, 6, 7, 8}),
135 /*expected_output_dtypes*/ {DT_INT64},
136 /*expected_output_shapes*/ {PartialTensorShape({1})},
137 /*expected_cardinality*/ tensorflow::data::kUnknownCardinality,
138 /*breakpoints*/ {0, 4, 11}};
139}
140
141// test case 3: cycle_length = 3, block_length = 1.
142TestCase TestCase3() {

Callers 1

Calls 4

PartialTensorShapeClass · 0.85
MakeTensorSliceDatasetFunction · 0.85
TensorShapeClass · 0.50

Tested by

no test coverage detected