OpenMMLab Detection Toolbox and Benchmark https://mmdetection.readthedocs.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

9 lines
280 B

import numpy.testing as npt
from mmdet.utils.flops_counter import params_to_string
def test_params_to_string():
npt.assert_equal(params_to_string(1e9), '1000.0 M')
npt.assert_equal(params_to_string(2e5), '200.0 k')
npt.assert_equal(params_to_string(3e-9), '3e-09')