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_backwardReturns the total FLOPs for backward calculation using this module. flops_forwardReturns the total FLOPs for forward calculation using this module. forward_elapsed_time_msReturns the forward time of the module in ms. has_uninitialized_paramReturns if a parameter in this module is uninitialized in_sizeReturns the input size of the module module_nameReturns the name of this module module_typeReturns the type of this module. num_parametersReturns the total number of parameters in this module. num_trainable_parametersReturns the total number of trainable parameters (requires_grad=True) in this module. out_sizeReturns the output size of the module size_bytesReturns the total estimated size in bytes of a module. submodule_summariesA Dict with the names of submodules as keys and corresponding ModuleSummaryobjects as values.