зеркало из https://github.com/microsoft/MMdnn.git
This commit is contained in:
Коммит
ed7947304f
|
@ -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
|
||||
},
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче