Package: edgebenchmark
Edge BenchmarkMeasure the speed of your machine learning models on real devices!InstallationpipinstalledgebenchmarkFirst UseBefore you can use Edge Benchmark,sign upand generate your secret token inProfile section.Then, run following commandedgebenchmarkconfigureand insert your secret token when you see prompt as shown below.EdgeBenchmarkToken[None]:Your secret token is saved at~/.edgebenchmark/token.Edge BenchmarkEdge Benchmark can be either used directly from command line withedgebenchmarkcommand, or from Python script.Edge Benchmark CLIEdge Benchmark CLI tool offers several commands:configureandtflite.edgebenchmark--helpUsage:edgebenchmark[OPTIONS]COMMAND[ARGS]...

Options:--helpShowthismessageandexit.

Commands:configuredevicestfliteconfigurecommand is explained in theFirst usesection.tflitecommand is for benchmarking the speed of TensorFlow Lite models. You can setup many parameters to control the benchmarking process and also select devices (--devices) which you want to benchmark with.We support several different TFLite version. All supported version can be shown by executing the help command below.edgebenchmarktflite--helpUsage:edgebenchmarktflite[OPTIONS]COMMAND[ARGS]...

Options:--helpShowthismessageandexit.

Commands:1.14.01.15.01.15.21.15.31.15.42.0.02.0.12.0.22.0.32.1.02.1.12.1.22.2.02.2.12.3.02.4.02.4.1Each TfLite version has a little bit different parameter set. For example, if you want to see supported parameters for TFLite version 1.14.0, run the command below.edgebenchmarktflite1.14.0--helpUsage:edgebenchmarktflite1.14.0[OPTIONS]Options:--featuresFEATURES-d,--deviceTEXT--model_pathMODEL_PATH[required]--allow_fp16BOOLEAN--input_layer_shapeTEXT--input_layerTEXT--warmup_runsINTEGER--output_prefixTEXT--benchmark_nameTEXT--num_threadsINTEGER--run_delayINTEGER--num_runsINTEGER--helpShowthismessageandexit.Edge Benchmark Python PackageIf you prefer to benchmark your machine learning models directly from Python, you can use our Python packageedgebenchmark.fromedgebenchmarkimportTFLiteBenchmarkbenchmark=TFLiteBenchmark("1.14.0")benchmark.num_threads=2benchmark.warmup_runs=10benchmark.num_runs=20benchmark.devices=["LGG6"]benchmark.features={"num_params":14000}benchmark.run("model.tflite")Currently available devicesIf you want to select specific devices for benchmarking, but you are not sure what devices we currently support, you can usedevicescommand as shown below.edgebenchmarkdevicesThis command will return you a set of available devices which you can then specify for benchmarking using--deviceor-dparameter.OnePlus6t
SamsungGalaxy3FAQHere, you can find the most common questions and their answers. If you would like to ask any question, feel free to open a new issue or send us email tocontact@bisonai.com.How to select multiple devices?Devices should be selected with-dod--deviceparameter. For example, following script will benchmarkmodel.tflitemodel onOnePlus6tandSonyXperiaZ5.edgebenchmarktflite1.14.0\--model_pathmodel.tflite\-dOnePlus6t\-dSonyXperiaZ5How to send extrafeaturesto Edge Benchmark?If you want to attach aditional information to your benchmark, you can use--featurespararemeter as shown below.edgebenchmarktflite\--model_pathmodel.tflite\-dOnePlus6t\--features"{'num_params': 14000}"LicenceApache License 2.0