size
Size modules for benchmarking
compute_size
compute_size (model:torch.nn.modules.module.Module)
High‑level helper that returns a SizeMetrics instance.
SizeMetrics
SizeMetrics (disk_bytes:int, size_mib:float, num_params:int)
get_num_parameters
get_num_parameters (model:torch.nn.modules.module.Module, trainable_only:bool=True)
Count the number of (optionally trainable) parameters.
get_model_size
get_model_size (model:torch.nn.modules.module.Module)
Return the on‑disk* size (in bytes) of the serialised model.*