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

Function weighted_processing_time

tensorflow/core/framework/model_test.cc:454–462  ·  view source on GitHub ↗

Returns a weighted sum of a prior and the actual processing time.

Source from the content-addressed store, hash-verified

452
453// Returns a weighted sum of a prior and the actual processing time.
454double weighted_processing_time(int64 num_elements, double processing_time,
455 double prior) {
456 if (num_elements < 30) {
457 double prior_weight = 1.0L / static_cast<double>(2 << num_elements);
458 return prior_weight * prior + (1.0L - prior_weight) * processing_time;
459 } else {
460 return processing_time;
461 }
462}
463
464TEST(TestManyElements, Model) {
465 std::shared_ptr<Node> interleave_many =

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected