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

Function TestCase1

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

Test case 1: size=2, shift=2, stride=1, drop_remainder=false.

Source from the content-addressed store, hash-verified

69
70// Test case 1: size=2, shift=2, stride=1, drop_remainder=false.
71TestCase TestCase1() {
72 return {/*range_data_param*/ {0, 7, 1},
73 /*size*/ CreateTensor<int64>(TensorShape({}), {2}),
74 /*shift*/ CreateTensor<int64>(TensorShape({}), {2}),
75 /*stride*/ CreateTensor<int64>(TensorShape({}), {1}),
76 /*drop_remainder*/
77 CreateTensor<bool>(TensorShape({}), {false}),
78 /*expected_outputs*/
79 {{CreateTensor<int64>(TensorShape({}), {0}),
80 CreateTensor<int64>(TensorShape({}), {1})},
81 {CreateTensor<int64>(TensorShape({}), {2}),
82 CreateTensor<int64>(TensorShape({}), {3})},
83 {CreateTensor<int64>(TensorShape({}), {4}),
84 CreateTensor<int64>(TensorShape({}), {5})},
85 {CreateTensor<int64>(TensorShape({}), {6})}},
86 /*expected_output_dtypes*/ {DT_VARIANT},
87 /*expected_output_shapes*/ {PartialTensorShape({})},
88 /*expected_cardinality*/ 4,
89 /*breakpoints*/ {0, 1, 9}};
90}
91
92// Test case 2: size=2, shift=2, stride=2, drop_remainder=true.
93TestCase TestCase2() {

Callers 2

TEST_FFunction · 0.70

Calls 2

PartialTensorShapeClass · 0.85
TensorShapeClass · 0.50

Tested by

no test coverage detected