Shortcuts

mmengine.analysis.get_model_complexity_info

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

Interface to get the complexity of a model.

Parameters
  • 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.

Returns

The complexity information of the model.

Return type

dict

Read the Docs v: v0.6.0
Versions
latest
stable
v0.6.0
v0.5.0
v0.4.0
v0.3.0
v0.2.0
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.