parameters: (model, inputs, readable=False)
return_statement: return total_flops, total_params
docstring: Stat the complexity of the given model. Currently includes flops and params.
    MACs: multiply–accumulate operations that performs a += b x c
    Params: total number of parameters of a model.
  
    Args:
      model: An `nn.Module` object.
      inputs: A list or tuple of inputs used to run forward passes on the model.
      readable: Whether to return readable numbers.
  
    Returns:
      Statistically obtained flops and params by given inputs.
docstring_summary: Stat the complexity of the given model. Currently includes flops and params.
    MACs: multiply–accumulate operations that performs a += b x c
    Params: total number of parameters of a model.
docstring_tokens: Stat the complexity of the given model . Currently includes flops and params . MACs : multiply–accumulate operations that performs a + = b x c Params : total number of parameters of a model .
function: def model_complexity(model, inputs, readable=False):
    """Stat the complexity of the given model. Currently includes flops and params.
    MACs: multiply–accumulate operations that performs a += b x c
    Params: total number of parameters of a model.
  
    Args:
      model: An `nn.Module` object.
      inputs: A list or tuple of inputs used to run forward passes on the model.
      readable: Whether to return readable numbers.
  
    Returns:
      Statistically obtained flops and params by given inputs.
    """
    flops = stat_flops(model, inputs)
    total_flops = 0
    for module, value in flops.items():
      total_flops += value
  
    total_params = 0
    params = stat_params(model)
    for name in params:
      if MetricName.TrainableParams in params[name]:
        total_params += params[name][MetricName.TrainableParams]
  
    if readable:
      total_flops = common.readable_num(total_flops)
      total_params = common.readable_num(total_params)
    return total_flops, total_params
function_tokens: def model_complexity ( model , inputs , readable = False ) : flops = stat_flops ( model , inputs ) total_flops = 0 for module , value in flops . items ( ) : total_flops += value total_params = 0 params = stat_params ( model ) for name in params : if MetricName . TrainableParams in params [ name ] : total_params += params [ name ] [ MetricName . TrainableParams ] if readable : total_flops = common . readable_num ( total_flops ) total_params = common . readable_num ( total_params ) return total_flops , total_params