Home / Function/ __init__() — pytorch Function Reference

__init__() — pytorch Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  b0ebe103_8e02_5afc_8d28_cf965a771625["__init__()"]
  0b66073b_10d9_d2e9_f83d_01d82f509823["parse_args()"]
  0b66073b_10d9_d2e9_f83d_01d82f509823 -->|calls| b0ebe103_8e02_5afc_8d28_cf965a771625
  af74d132_8840_19ff_d394_8c73872d97c9["__init__()"]
  af74d132_8840_19ff_d394_8c73872d97c9 -->|calls| b0ebe103_8e02_5afc_8d28_cf965a771625
  style b0ebe103_8e02_5afc_8d28_cf965a771625 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

benchmarks/dynamo/common.py lines 1782–1788

    def __init__(self):
        self.model_iter_fn = None
        self.grad_scaler = DummyGradScaler()
        self.autocast = contextlib.nullcontext
        self.autocast_arg = {}
        self.optimizer: Optional[torch.optim.Optimizer] = None
        self._args = None

Subdomains

Frequently Asked Questions

What does __init__() do?
__init__() is a function in the pytorch codebase.
What calls __init__()?
__init__() is called by 2 function(s): __init__, parse_args.

Analyze Your Own Codebase

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

Try Supermodel Free