diff --git a/x2paddle/op_mapper/caffe_custom_layer/normalize.py b/x2paddle/op_mapper/caffe_custom_layer/normalize.py index 0aa4c2f4119d501e975f90fd7523cb5120a24616..577a674f7e70aebee78735611c11e7202b2ccf7e 100644 --- a/x2paddle/op_mapper/caffe_custom_layer/normalize.py +++ b/x2paddle/op_mapper/caffe_custom_layer/normalize.py @@ -18,6 +18,8 @@ def normalize_layer(inputs, shape=[1] if channel_shared else [input_shape[0][1]], dtype=input.dtype, attr=name + '_scale') + scale_param = fluid.layers.reshape(x=scale_param, \ + shape=[1] if channel_shared else [input_shape[0][1]]) out = fluid.layers.elementwise_mul(x=l2_norm, y=scale_param, axis=-1 if channel_shared else 1)