Skip to content

Latest commit

 

History

History
69 lines (38 loc) · 3.59 KB

File metadata and controls

69 lines (38 loc) · 3.59 KB
graph LR
    stat["stat"]
    _analyze_model["_analyze_model"]
    ModelStat["ModelStat"]
    convert_leaf_modules_to_stat_tree["convert_leaf_modules_to_stat_tree"]
    show_report["show_report"]
    stat -- "orchestrates" --> _analyze_model
    stat -- "calls" --> show_report
    _analyze_model -- "populates" --> ModelStat
    _analyze_model -- "utilizes" --> convert_leaf_modules_to_stat_tree
    convert_leaf_modules_to_stat_tree -- "creates" --> ModelStat
    show_report -- "consumes" --> ModelStat
Loading

CodeBoardingDemoContact

Details

The Statistics Aggregation & Orchestration subsystem is primarily defined by the torchstat.statistics module and its contained classes and functions. This subsystem acts as the central control and data processing unit for the neural network analysis pipeline.

stat

Acts as the public API and central orchestrator for the entire model analysis pipeline. It takes a PyTorch model and input tensor, initiates the analysis, and coordinates the generation and display of the final report.

Related Classes/Methods:

_analyze_model

Manages the internal steps of model analysis. This includes traversing the model's modules, collecting raw data, and initiating the conversion of this data into a structured statistical representation using ModelStat objects.

Related Classes/Methods:

ModelStat

Serves as the primary data structure for holding and aggregating statistical information (e.g., FLOPs, parameters, memory) for a specific module or a collection of modules within the neural network. Instances of ModelStat form the nodes of the hierarchical statistical tree.

Related Classes/Methods:

convert_leaf_modules_to_stat_tree

Transforms the flat list of individual PyTorch modules (leaf modules) into a hierarchical tree structure composed of ModelStat objects. This is crucial for representing the nested nature of neural networks and aggregating statistics at different levels.

Related Classes/Methods:

show_report

Takes the processed statistical data (represented by the ModelStat tree) and presents it in a human-readable format, typically a tabular report. It handles the final output formatting and display logic.

Related Classes/Methods: