This commit is contained in:
Kit 2018-02-09 13:59:49 +08:00
Родитель 345265be54 6aafb95d34
Коммит ed7947304f
4 изменённых файлов: 17 добавлений и 7 удалений

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

@ -36,7 +36,8 @@ class caffe_extractor(base_extractor):
@classmethod
def download(cls, architecture, path="./"):
if cls.sanity_check(architecture):
architecture_file = download_file(cls.architecture_map[architecture]['prototxt'], directory=path)
prototxt_name = architecture + "-deploy.prototxt"
architecture_file = download_file(cls.architecture_map[architecture]['prototxt'], directory=path ,local_fname=prototxt_name)
if not architecture_file:
return None

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

@ -64,7 +64,7 @@ class TestKit(object):
'caffe' : {
'alexnet' : lambda path : TestKit.ZeroCenter(path, 227, True),
'vgg19' : lambda path : TestKit.ZeroCenter(path, 224, True),
'inception_v1' : lambda path : TestKit.ZeroCenter(path, 227, True),
'inception_v1' : lambda path : TestKit.ZeroCenter(path, 224, True),
'resnet152' : lambda path : TestKit.ZeroCenter(path, 224, True),
'squeezenet' : lambda path : TestKit.ZeroCenter(path, 227, False)
},

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

@ -20,6 +20,14 @@ from mmdnn.conversion.common.utils import download_file
class tensorflow_extractor(base_extractor):
architecture_map = {
'vgg19' : {
'url' : 'http://download.tensorflow.org/models/vgg_19_2016_08_28.tar.gz',
'filename' : 'vgg_19.ckpt',
'builder' : lambda : vgg.vgg_19,
'arg_scope' : vgg.vgg_arg_scope,
'input' : lambda : tf.placeholder(name='input', dtype=tf.float32, shape=[None, 224, 224, 3]),
'num_classes' : 1000,
},
'inception_v1' : {
'url' : 'http://download.tensorflow.org/models/inception_v1_2016_08_28.tar.gz',
'filename' : 'inception_v1.ckpt',

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

@ -313,13 +313,14 @@ class TestModels(CorrectnessTest):
'imagenet1k-resnext-50' : [CntkEmit, TensorflowEmit, KerasEmit, PytorchEmit],
},
'caffe' : {
# 'vgg19' : [KerasEmit],
'alexnet' : [TensorflowEmit, KerasEmit],
# 'inception_v1' : [CntkEmit],
# 'resnet152' : [CntkEmit],
# 'squeezenet' : [CntkEmit]
'vgg19' : [CntkEmit, TensorflowEmit, KerasEmit, PytorchEmit],
'alexnet' : [CntkEmit],
'inception_v1' : [CntkEmit, TensorflowEmit, KerasEmit, PytorchEmit],
'resnet152' : [CntkEmit, TensorflowEmit, KerasEmit, PytorchEmit],
'squeezenet' : [CntkEmit, PytorchEmit]
},
'tensorflow' : {
'vgg19' : [CntkEmit, TensorflowEmit, KerasEmit, PytorchEmit],
'inception_v1' : [TensorflowEmit, KerasEmit, PytorchEmit], # TODO: CntkEmit
},
}