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

Function TestCase7

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

Test Case 7: num_shard is larger than the cardinality of input dataset; require_non_empty = false.

Source from the content-addressed store, hash-verified

169// Test Case 7: num_shard is larger than the cardinality of input dataset;
170// require_non_empty = false.
171TestCase TestCase7() {
172 return {/*range_data_param*/ {0, 10, 1},
173 /*num_shards*/
174 CreateTensor<int64>(TensorShape({}), {20}),
175 /*index*/
176 CreateTensor<int64>(TensorShape({}), {5}),
177 /*require_non_empty*/ false,
178 /*expected_outputs*/
179 {CreateTensor<int64>(TensorShape({}), {5})},
180 /*expected_output_dtypes*/ {DT_INT64},
181 /*expected_output_shapes*/ {PartialTensorShape({})},
182 /*expected_cardinality*/ 1,
183 /*breakpoints*/ {0, 5}};
184}
185
186// Test Case 8: similar with test_case_7 but require_non_empty = true.
187TestCase NoElemForEachShardTestCase() {

Callers 1

Calls 2

PartialTensorShapeClass · 0.85
TensorShapeClass · 0.50

Tested by

no test coverage detected