зеркало из https://github.com/microsoft/MMdnn.git
MXNet -> Cntk resnext test passed.
This commit is contained in:
Родитель
421b208023
Коммит
4c1e18de6b
|
@ -63,6 +63,7 @@ Models | Caffe | Keras | Tensorflow
|
|||
[SqueezeNet](https://arxiv.org/pdf/1602.07360) | √ | √ | √ | √ | √ | ×
|
||||
DenseNet | | √ | √ | √ | | |
|
||||
[NASNet](https://arxiv.org/abs/1707.07012) | | √ | √ | × (no SeparableConv)
|
||||
[ResNext] | | √ | √ | √ | √ |
|
||||
|
||||
#### On-going frameworks
|
||||
|
||||
|
|
|
@ -29,9 +29,9 @@ CNTK model file is saved as [cntk_inception_v3.dnn], generated by [cntk_inceptio
|
|||
|
||||
Ubuntu 16.04 with
|
||||
|
||||
- CNTK gpu 2.3
|
||||
- CNTK CPU 2.4
|
||||
|
||||
@ 2017/12/01
|
||||
@ 2018/02/08
|
||||
|
||||
## Limitation
|
||||
|
||||
|
|
|
@ -480,8 +480,17 @@ class MXNetParser(Parser):
|
|||
# print("Warning: Layer [{}] has changed model data format from [{}] to [{}]".format(source_node.name, self.data_format, layout))
|
||||
self.data_format = layout
|
||||
|
||||
# groups
|
||||
group = int(layer_attr.get("num_group", "1"))
|
||||
IR_node.attr["group"].i = group
|
||||
in_channel = self.IR_layer_map[IR_node.input[0]].attr["_output_shapes"].list.shape[0].dim[-1].size
|
||||
|
||||
if group == in_channel:
|
||||
self._copy_and_reop(source_node, IR_node, "DepthwiseConv")
|
||||
else:
|
||||
self._copy_and_reop(source_node, IR_node, "Conv")
|
||||
in_channel = in_channel // group
|
||||
|
||||
assert "num_filter" in layer_attr
|
||||
out_channel = int(layer_attr.get("num_filter"))
|
||||
|
||||
|
@ -511,14 +520,6 @@ class MXNetParser(Parser):
|
|||
# data_format
|
||||
assign_IRnode_values(IR_node, {'data_format' : layout})
|
||||
|
||||
# groups
|
||||
group = int(layer_attr.get("num_group", "1"))
|
||||
IR_node.attr["group"].i = group
|
||||
if group == in_channel:
|
||||
self._copy_and_reop(source_node, IR_node, "DepthwiseConv")
|
||||
else:
|
||||
self._copy_and_reop(source_node, IR_node, "Conv")
|
||||
|
||||
# padding
|
||||
if "pad" in layer_attr:
|
||||
pad = MXNetParser.str2intList(layer_attr.get("pad"))
|
||||
|
|
|
@ -140,7 +140,7 @@ class TestModels(CorrectnessTest):
|
|||
|
||||
@staticmethod
|
||||
def TensorflowEmit(original_framework, architecture_name, architecture_path, weight_path, image_path):
|
||||
print("Testing {} from {} to Tensorflow.".format(architecture_name, original_framework))
|
||||
print("Testing {} from {} to TensorFlow.".format(architecture_name, original_framework))
|
||||
|
||||
# IR to code
|
||||
emitter = TensorflowEmitter((architecture_path, weight_path))
|
||||
|
@ -169,7 +169,7 @@ class TestModels(CorrectnessTest):
|
|||
|
||||
@staticmethod
|
||||
def PytorchEmit(original_framework, architecture_name, architecture_path, weight_path, image_path):
|
||||
print("Testing {} from {} to Pytorch.".format(architecture_name, original_framework))
|
||||
print("Testing {} from {} to PyTorch.".format(architecture_name, original_framework))
|
||||
|
||||
# IR to code
|
||||
emitter = PytorchEmitter((architecture_path, weight_path))
|
||||
|
@ -247,8 +247,8 @@ class TestModels(CorrectnessTest):
|
|||
'imagenet1k-inception-bn' : [CntkEmit, TensorflowEmit, KerasEmit, PytorchEmit],
|
||||
'imagenet1k-resnet-152' : [CntkEmit, TensorflowEmit, KerasEmit, PytorchEmit],
|
||||
'squeezenet_v1.1' : [CntkEmit, TensorflowEmit, KerasEmit, PytorchEmit],
|
||||
'imagenet1k-resnext-101-64x4d' : [TensorflowEmit, PytorchEmit], # TODO: CntkEmit
|
||||
'imagenet1k-resnext-50' : [TensorflowEmit, KerasEmit, PytorchEmit], # TODO: CntkEmit
|
||||
'imagenet1k-resnext-101-64x4d' : [CntkEmit, TensorflowEmit, PytorchEmit], # Keras is too slow
|
||||
'imagenet1k-resnext-50' : [CntkEmit, TensorflowEmit, KerasEmit, PytorchEmit],
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче