This commit is contained in:
Kit 2018-02-09 19:28:34 +08:00
Родитель 64a46ded3d
Коммит b473a39e11
1 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -107,6 +107,7 @@ class TestModels(CorrectnessTest):
del Keras2Parser
return original_predict
@staticmethod
def MXNetParse(architecture_name, image_path):
from mmdnn.conversion.examples.mxnet.extractor import mxnet_extractor
@ -134,6 +135,7 @@ class TestModels(CorrectnessTest):
return original_predict
@staticmethod
def CaffeParse(architecture_name, image_path):
from mmdnn.conversion.examples.caffe.extractor import caffe_extractor
@ -168,6 +170,7 @@ class TestModels(CorrectnessTest):
return original_predict
@staticmethod
def CntkParse(architecture_name, image_path):
from mmdnn.conversion.examples.cntk.extractor import cntk_extractor
@ -187,6 +190,7 @@ class TestModels(CorrectnessTest):
del CntkParser
return original_predict
@staticmethod
def CntkEmit(original_framework, architecture_name, architecture_path, weight_path, image_path):
# IR to code
@ -305,6 +309,7 @@ class TestModels(CorrectnessTest):
os.remove(converted_file + '.py')
return converted_predict
@staticmethod
def MXNetEmit(original_framework, architecture_name, architecture_path, weight_path, image_path):
from collections import namedtuple
@ -343,6 +348,8 @@ class TestModels(CorrectnessTest):
os.remove(output_weights_file)
return converted_predict
test_table = {
'cntk' : {
# 'alexnet' : [TensorflowEmit, KerasEmit],
@ -444,5 +451,5 @@ class TestModels(CorrectnessTest):
self._test_function('keras', self.KerasParse)
# def test_mxnet(self):
# self._test_function('mxnet', self.MXNetParse)
def test_mxnet(self):
self._test_function('mxnet', self.MXNetParse)