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

Function TestCase3

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

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

Source from the content-addressed store, hash-verified

140
141// test case 3: cycle_length = 3, block_length = 1.
142TestCase TestCase3() {
143 return {
144 /*input_tensors*/
145 {CreateTensor<int64>(TensorShape{3, 3, 1}, {0, 1, 2, 3, 4, 5, 6, 7, 8})},
146 /*func*/
147 MakeTensorSliceDatasetFunc(
148 DataTypeVector({DT_INT64}),
149 std::vector<PartialTensorShape>({PartialTensorShape({1})})),
150 /*func_lib*/ {test::function::MakeTensorSliceDataset()},
151 /*cycle_length*/
152 CreateTensor<int64>(TensorShape({}), {3}),
153 /*block_length*/
154 CreateTensor<int64>(TensorShape({}), {1}),
155 /*expected_outputs*/
156 ConvertToTensorVec<int64>({0, 3, 6, 1, 4, 7, 2, 5, 8}),
157 /*expected_output_dtypes*/ {DT_INT64},
158 /*expected_output_shapes*/ {PartialTensorShape({1})},
159 /*expected_cardinality*/ tensorflow::data::kUnknownCardinality,
160 /*breakpoints*/ {0, 4, 11}};
161}
162
163// test case 4: cycle_length = 5, block_length = 1.
164TestCase TestCase4() {

Callers 1

Calls 4

PartialTensorShapeClass · 0.85
MakeTensorSliceDatasetFunction · 0.85
TensorShapeClass · 0.50

Tested by

no test coverage detected