diff options
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.py | 23 |
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 @@ | |||
1 | import os | ||
2 | |||
3 | class 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)) | ||