mirror of
git://git.yoctoproject.org/meta-intel.git
synced 2025-07-17 02:49:03 +02:00

Add sanity tests for inference engine: - test inference engine c/cpp shared library - test inference engine python api - test inference engine cpu, gpu, myriad plugin Add sanity tests for model optimizer - test model optmizer can generate ir Licenses: - classification_sample.py license: Apache 2.0 source: <install_root>/deployment_tools/inference_engine/samples/* Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
24 lines
929 B
Python
24 lines
929 B
Python
import os
|
|
|
|
class DldtModelOptimizerTest(object):
|
|
mo_input_files = {'model': 'squeezenet_v1.1.caffemodel',
|
|
'prototxt': 'deploy.prototxt'}
|
|
mo_exe = 'mo.py'
|
|
|
|
def __init__(self, target, work_dir):
|
|
self.target = target
|
|
self.work_dir = work_dir
|
|
|
|
def setup(self):
|
|
self.target.run('mkdir -p %s' % self.work_dir)
|
|
|
|
def tear_down(self):
|
|
self.target.run('rm -rf %s' % self.work_dir)
|
|
|
|
def test_dldt_mo_can_create_ir(self, mo_exe_dir, mo_files_dir):
|
|
return self.target.run('python3 %s --input_model %s --input_proto %s --output_dir %s --data_type FP16' %
|
|
(os.path.join(mo_exe_dir, self.mo_exe),
|
|
os.path.join(mo_files_dir, self.mo_input_files['model']),
|
|
os.path.join(mo_files_dir, self.mo_input_files['prototxt']),
|
|
self.work_dir))
|