torchtnt.utils.module_summary.ModuleSummary¶
-
class
torchtnt.utils.module_summary.
ModuleSummary
¶ Summary of module and its submodules. It collects the following information:
- Name
- Type
- Number of parameters
- Number of trainable parameters
- Estimated size in bytes
- Whether this module contains uninitialized parameters
- FLOPs for forward (“?” meaning not calculated)
- FLOPs for backward (“?” meaning not calculated)
- Input shape (“?” meaning not calculated)
- Output shape (“?” meaning not calculated)
- Forward elapsed time in ms (“?” meaning not calculated)
-
__init__
() None ¶
Methods
__init__
()Attributes
flops_backward
Returns the total FLOPs for backward calculation using this module. flops_forward
Returns the total FLOPs for forward calculation using this module. forward_elapsed_time_ms
Returns the forward time of the module in ms. has_uninitialized_param
Returns if a parameter in this module is uninitialized in_size
Returns the input size of the module module_name
Returns the name of this module module_type
Returns the type of this module. num_parameters
Returns the total number of parameters in this module. num_trainable_parameters
Returns the total number of trainable parameters (requires_grad=True) in this module. out_size
Returns the output size of the module size_bytes
Returns the total estimated size in bytes of a module. submodule_summaries
A Dict with the names of submodules as keys and corresponding ModuleSummary
objects as values.