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

Function TestCase1

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

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

Source from the content-addressed store, hash-verified

96
97// test case 1: cycle_length = 1, block_length = 1.
98TestCase TestCase1() {
99 return {
100 /*input_tensors*/
101 {CreateTensor<int64>(TensorShape{3, 3, 1}, {0, 1, 2, 3, 4, 5, 6, 7, 8})},
102 /*func*/
103 MakeTensorSliceDatasetFunc(
104 DataTypeVector({DT_INT64}),
105 std::vector<PartialTensorShape>({PartialTensorShape({1})})),
106 /*func_lib*/ {test::function::MakeTensorSliceDataset()},
107 /*cycle_length*/
108 CreateTensor<int64>(TensorShape({}), {1}),
109 /*block_length*/
110 CreateTensor<int64>(TensorShape({}), {1}),
111 /*expected_outputs*/
112 ConvertToTensorVec<int64>({0, 1, 2, 3, 4, 5, 6, 7, 8}),
113 /*expected_output_dtypes*/ {DT_INT64},
114 /*expected_output_shapes*/ {PartialTensorShape({1})},
115 /*expected_cardinality*/ tensorflow::data::kUnknownCardinality,
116 /*breakpoints*/ {0, 4, 11}};
117}
118
119// test case 2: cycle_length = 2, block_length = 1.
120TestCase TestCase2() {

Callers 2

TEST_FFunction · 0.70

Calls 4

PartialTensorShapeClass · 0.85
MakeTensorSliceDatasetFunction · 0.85
TensorShapeClass · 0.50

Tested by

no test coverage detected