Shortcuts

mmengine.analysis.get_model_complexity_info

mmengine.analysis.get_model_complexity_info(model, input_shape, inputs=None, show_table=True, show_arch=True)[源代码]

Interface to get the complexity of a model.

参数
  • model (nn.Module) – The model to analyze.

  • input_shape (tuple) – The input shape of the model.

  • inputs (torch.Tensor, optional) – The input tensor of the model. If not given the input tensor will be generated automatically with the given input_shape.

  • show_table (bool) – Whether to show the complexity table. Defaults to True.

  • show_arch (bool) – Whether to show the complexity arch. Defaults to True.

返回

The complexity information of the model.

返回类型

dict