From 4e802711618bb3217a3587a0e01eceb9e637b035 Mon Sep 17 00:00:00 2001 From: wuchenghui Date: Thu, 19 Apr 2018 16:01:34 +0800 Subject: [PATCH] fix caffe graph convert --- mace/python/tools/caffe_converter_lib.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mace/python/tools/caffe_converter_lib.py b/mace/python/tools/caffe_converter_lib.py index 4086cc87..cce64c4d 100644 --- a/mace/python/tools/caffe_converter_lib.py +++ b/mace/python/tools/caffe_converter_lib.py @@ -800,7 +800,9 @@ class CaffeConverter(object): input_shape = op.get_single_parent().output_shape_map[op.layer.bottom[ 0]] if param.HasField('global_pooling') and param.global_pooling: - kernels = [input_shape[2], input_shape[3]] + kernels = [input_shape[2], input_shape[3]] \ + if self.device == 'neon' else \ + [input_shape[1], input_shape[2]] kernel_arg = op_def.arg.add() kernel_arg.name = 'kernels' -- GitLab