torchscan.utils¶
- torchscan.utils.format_info(module_info: Dict[str, Any], wrap_mode: str = 'mid', receptive_field: bool = False, effective_rf_stats: bool = False) str [source]¶
Print module summary for an expected input tensor shape
- Parameters:
module_info – dictionary output of crawl_module
wrap_mode – wrapping mode
receptive_field – whether to display receptive field
effective_rf_stats – if receptive_field is True, displays effective stride and padding
- Returns:
formatted information
- torchscan.utils.aggregate_info(info: Dict[str, Any], max_depth: int) Dict[str, Any] [source]¶
Aggregate module information to a maximum depth
- Parameters:
info – dictionary output of crawl_module
max_depth – depth at which parent node aggregates children information
- Returns:
edited dictionary information