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

Function TestCase6

tensorflow/core/kernels/data/shard_dataset_op_test.cc:153–167  ·  view source on GitHub ↗

Test Case 6: similar with test_case_5 but the number of outputs could not be divided evenly by num_shards.

Source from the content-addressed store, hash-verified

151// Test Case 6: similar with test_case_5 but the number of outputs could not be
152// divided evenly by num_shards.
153TestCase TestCase6() {
154 return {/*range_data_param*/ {0, 10, 1},
155 /*num_shards*/
156 CreateTensor<int64>(TensorShape({}), {4}),
157 /*index*/
158 CreateTensor<int64>(TensorShape({}), {3}),
159 /*require_non_empty*/ true,
160 /*expected_outputs*/
161 {CreateTensor<int64>(TensorShape({}), {3}),
162 CreateTensor<int64>(TensorShape({}), {7})},
163 /*expected_output_dtypes*/ {DT_INT64},
164 /*expected_output_shapes*/ {PartialTensorShape({})},
165 /*expected_cardinality*/ 2,
166 /*breakpoints*/ {0, 1, 5}};
167}
168
169// Test Case 7: num_shard is larger than the cardinality of input dataset;
170// require_non_empty = false.

Callers 1

Calls 2

PartialTensorShapeClass · 0.85
TensorShapeClass · 0.50

Tested by

no test coverage detected