summaryrefslogtreecommitdiffstats
path: root/lib/oeqa/runtime/miutils/tests/dldt_model_optimizer_test.py
diff options
context:
space:
mode:
authorYeoh Ee Peng <ee.peng.yeoh@intel.com>2019-12-04 11:17:42 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2019-12-10 13:31:24 +0800
commit1e514838dfad1d2339f896f850425bc33621d297 (patch)
treef93a016de883f4af953592e7c635cae6e6f56308 /lib/oeqa/runtime/miutils/tests/dldt_model_optimizer_test.py
parentf39ad91524768c729cd68ce367dacf9b4dfc4cf7 (diff)
downloadmeta-intel-1e514838dfad1d2339f896f850425bc33621d297.tar.gz
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>
Diffstat (limited to 'lib/oeqa/runtime/miutils/tests/dldt_model_optimizer_test.py')
-rw-r--r--lib/oeqa/runtime/miutils/tests/dldt_model_optimizer_test.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/oeqa/runtime/miutils/tests/dldt_model_optimizer_test.py b/lib/oeqa/runtime/miutils/tests/dldt_model_optimizer_test.py
new file mode 100644
index 00000000..7d3db15b
--- /dev/null
+++ b/lib/oeqa/runtime/miutils/tests/dldt_model_optimizer_test.py
@@ -0,0 +1,23 @@
1import os
2
3class DldtModelOptimizerTest(object):
4 mo_input_files = {'model': 'squeezenet_v1.1.caffemodel',
5 'prototxt': 'deploy.prototxt'}
6 mo_exe = 'mo.py'
7
8 def __init__(self, target, work_dir):
9 self.target = target
10 self.work_dir = work_dir
11
12 def setup(self):
13 self.target.run('mkdir -p %s' % self.work_dir)
14
15 def tear_down(self):
16 self.target.run('rm -rf %s' % self.work_dir)
17
18 def test_dldt_mo_can_create_ir(self, mo_exe_dir, mo_files_dir):
19 return self.target.run('python3 %s --input_model %s --input_proto %s --output_dir %s --data_type FP16' %
20 (os.path.join(mo_exe_dir, self.mo_exe),
21 os.path.join(mo_files_dir, self.mo_input_files['model']),
22 os.path.join(mo_files_dir, self.mo_input_files['prototxt']),
23 self.work_dir))