File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed
Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1- __version__ = '2.0.0rc1 '
1+ __version__ = '2.0.0rc2 '
22short_version = __version__
33
44
Original file line number Diff line number Diff line change 22mmcls>=1.0.0.rc6
33mmcv>=2.0.0
44mmdet>=3.0.0, <3.1.0 # mmyolo currently does not support mmdet 3.1.0
5- mmengine>=0.7 .2
5+ mmengine>=0.8 .2
66mmpose>=1.0.0
77
88mmyolo@git+https://github.com/mjq2020/mmyolo
Original file line number Diff line number Diff line change @@ -178,7 +178,6 @@ def build_config(args):
178178
179179def main ():
180180 from mmengine .analysis import get_model_complexity_info
181- from mmengine .device import get_device
182181
183182 args = parse_args ()
184183 args = verify_args (args )
@@ -193,15 +192,16 @@ def main():
193192
194193 runner = RUNNERS .build (cfg )
195194
196- device = get_device ()
197- dummy_inputs = torch .randn (* args .input_shape , device = device )
198- model = runner .model .to (device = device )
195+ model = runner .model .to ('cpu' )
199196 model .eval ()
200197
201- analysis_results = get_model_complexity_info (model = model , inputs = ( dummy_inputs , ))
198+ analysis_results = get_model_complexity_info (model = model , input_shape = tuple ( args . input_shape [ 1 :] ))
202199
203- print ('Model Flops:{}' .format (analysis_results ['flops_str' ]))
204- print ('Model Parameters:{}' .format (analysis_results ['params_str' ]))
200+ print ('=' * 40 )
201+ print (f"{ 'Input Shape' :^20} :{ str (args .input_shape ):^20} " )
202+ print (f"{ 'Model Flops' :^20} :{ analysis_results ['flops_str' ]:^20} " )
203+ print (f"{ 'Model Parameters' :^20} :{ analysis_results ['params_str' ]:^20} " )
204+ print ('=' * 40 )
205205
206206 runner .train ()
207207
You can’t perform that action at this time.
0 commit comments