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

Function TestCase2

tensorflow/core/kernels/data/window_dataset_op_test.cc:93–111  ·  view source on GitHub ↗

Test case 2: size=2, shift=2, stride=2, drop_remainder=true.

Source from the content-addressed store, hash-verified

91
92// Test case 2: size=2, shift=2, stride=2, drop_remainder=true.
93TestCase TestCase2() {
94 return {/*range_data_param*/ {0, 7, 1},
95 /*size*/ CreateTensor<int64>(TensorShape({}), {2}),
96 /*shift*/ CreateTensor<int64>(TensorShape({}), {2}),
97 /*stride*/ CreateTensor<int64>(TensorShape({}), {2}),
98 /*drop_remainder*/
99 CreateTensor<bool>(TensorShape({}), {true}),
100 /*expected_outputs*/
101 {{CreateTensor<int64>(TensorShape({}), {0}),
102 CreateTensor<int64>(TensorShape({}), {2})},
103 {CreateTensor<int64>(TensorShape({}), {2}),
104 CreateTensor<int64>(TensorShape({}), {4})},
105 {CreateTensor<int64>(TensorShape({}), {4}),
106 CreateTensor<int64>(TensorShape({}), {6})}},
107 /*expected_output_dtypes*/ {DT_VARIANT},
108 /*expected_output_shapes*/ {PartialTensorShape({})},
109 /*expected_cardinality*/ 3,
110 /*breakpoints*/ {0, 1, 9}};
111}
112
113// Test case 3: size=8, shift=3, stride=1, drop_remainder=false.
114TestCase TestCase3() {

Callers 1

Calls 2

PartialTensorShapeClass · 0.85
TensorShapeClass · 0.50

Tested by

no test coverage detected