Home / Function/ decay_batch_exp() — pytorch Function Reference

decay_batch_exp() — pytorch Function Reference

Architecture documentation for the decay_batch_exp() function in common.py from the pytorch codebase.

Entity Profile

Dependency Diagram

graph TD
  88e41ee6_6f08_0c6a_8717_6ba30d9b1ad4["decay_batch_exp()"]
  ba74afb9_ef25_84a8_66e2_1d25dcee421f["batch_size_finder()"]
  ba74afb9_ef25_84a8_66e2_1d25dcee421f -->|calls| 88e41ee6_6f08_0c6a_8717_6ba30d9b1ad4
  style 88e41ee6_6f08_0c6a_8717_6ba30d9b1ad4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

benchmarks/dynamo/common.py lines 2043–2049

    def decay_batch_exp(self, batch_size, factor=0.5, divisor=2):
        out_batch_size = batch_size * factor
        if out_batch_size > divisor:
            out_batch_size = (out_batch_size + 1) // divisor * divisor
        else:
            out_batch_size = batch_size - 1
        return max(0, int(out_batch_size))

Subdomains

Frequently Asked Questions

What does decay_batch_exp() do?
decay_batch_exp() is a function in the pytorch codebase.
What calls decay_batch_exp()?
decay_batch_exp() is called by 1 function(s): batch_size_finder.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free