fastdev.utils.model_summary =========================== .. py:module:: fastdev.utils.model_summary Module Contents --------------- .. py:data:: console :value: None .. py:data:: PARAMETER_NUM_UNITS :value: [' ', 'K', 'M', 'B', 'T'] .. py:function:: get_human_readable_count(number: Union[int, float]) -> str Abbreviates an integer number with K, M, B, T for thousands, millions, billions and trillions, respectively. .. rubric:: Examples >>> get_human_readable_count(123) '123 ' >>> get_human_readable_count(1234) # (one thousand) '1.2 K' >>> get_human_readable_count(2e6) # (two million) '2.0 M' >>> get_human_readable_count(3e9) # (three billion) '3.0 B' >>> get_human_readable_count(4e14) # (four hundred trillion) '400 T' >>> get_human_readable_count(5e15) # (more than trillion) '5,000 T' :param number: a positive integer number :returns: A string formatted according to the pattern described above. .. py:function:: summarize_model(model: torch.nn.Module, max_depth: int = 1)