meta-intel/lib/oeqa/runtime/miutils/tests/dldt_model_optimizer_test.py
Yeoh Ee Peng 1e514838df oeqa/runtime/cases/dldt: Enable inference engine and model optimizer tests
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>
2019-12-10 13:31:24 +08:00

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))