From 684c0228917ee3459ddab1c1a88e91875cadc5af Mon Sep 17 00:00:00 2001 From: SunAhong1993 <48579383+SunAhong1993@users.noreply.github.com> Date: Mon, 10 Feb 2020 21:23:01 +0800 Subject: [PATCH] Update normalize.py --- x2paddle/op_mapper/caffe_custom_layer/normalize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x2paddle/op_mapper/caffe_custom_layer/normalize.py b/x2paddle/op_mapper/caffe_custom_layer/normalize.py index 577a674..3cef4e6 100644 --- a/x2paddle/op_mapper/caffe_custom_layer/normalize.py +++ b/x2paddle/op_mapper/caffe_custom_layer/normalize.py @@ -15,7 +15,7 @@ def normalize_layer(inputs, input = inputs[0] l2_norm = fluid.layers.l2_normalize(input, axis=1, name=name + '_l2') scale_param = fluid.layers.create_parameter( - shape=[1] if channel_shared else [input_shape[0][1]], + shape=[1] if channel_shared else [1, 1, 1, input_shape[0][1]], dtype=input.dtype, attr=name + '_scale') scale_param = fluid.layers.reshape(x=scale_param, \ -- GitLab