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

Function SkewedSize

tensorflow/core/framework/tensor_shape_test.cc:498–509  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

496// ------------------------------------------------------------------------
497
498static int64 SkewedSize(random::SimplePhilox* gen, int64 current_elements) {
499 int64 result = 0;
500 do {
501 if (current_elements < 100) {
502 result = gen->Uniform(100000);
503 } else {
504 result = gen->Uniform(2);
505 }
506 } while ((result * current_elements >= 1LL << 34) ||
507 (result * current_elements < 0));
508 return result;
509}
510
511TEST(TensorShapeTest, Randomized) {
512 // We do a randomized test to verify that the behavior of the

Callers 1

TESTFunction · 0.85

Calls 1

UniformMethod · 0.80

Tested by

no test coverage detected