Skip to content

Commit

Permalink
[Fix] Fix get_flops scrip (#3551)
Browse files Browse the repository at this point in the history
## Motivation

`inputs` and `input_shape` can't be both set to mmengine api
`get_model_complexity_info`

open-mmlab/mmengine#1056


## Modification

Set `input_shape` to None.
  • Loading branch information
xiexinch committed Jan 31, 2024
1 parent e1b48d5 commit 1929c25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/analysis_tools/get_flops.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def inference(args: argparse.Namespace, logger: MMLogger) -> dict:
'supported yet.')
outputs = get_model_complexity_info(
model,
input_shape,
input_shape=None,
inputs=data['inputs'],
show_table=False,
show_arch=False)
Expand Down

0 comments on commit 1929c25

Please sign in to comment.