From 11c16dfe594ecc73a3d230a7d2096f98f8375ef1 Mon Sep 17 00:00:00 2001 From: SunAhong1993 Date: Wed, 11 Sep 2019 14:12:59 +0800 Subject: [PATCH] fix the bug --- caffe2fluid/kaffe/custom_layers/normalize.py | 2 -- caffe2fluid/kaffe/custom_layers/priorbox.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/caffe2fluid/kaffe/custom_layers/normalize.py b/caffe2fluid/kaffe/custom_layers/normalize.py index 787fcc7..ec2eb14 100644 --- a/caffe2fluid/kaffe/custom_layers/normalize.py +++ b/caffe2fluid/kaffe/custom_layers/normalize.py @@ -47,8 +47,6 @@ def normalize_layer(input, scale_attr = fluid.ParamAttr(name=param_prefix + '_scale') scale_param = fluid.layers.create_parameter( shape=shape, dtype=input.dtype, name=name, attr=scale_attr) - 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) return out diff --git a/caffe2fluid/kaffe/custom_layers/priorbox.py b/caffe2fluid/kaffe/custom_layers/priorbox.py index e3eb640..f1d3135 100644 --- a/caffe2fluid/kaffe/custom_layers/priorbox.py +++ b/caffe2fluid/kaffe/custom_layers/priorbox.py @@ -32,7 +32,7 @@ def priorbox_layer(inputs, name, min_size, max_size=None, - aspect_ratio=None, + aspect_ratio=1.0, variance=[0.1, 0.1, 0.2, 0.2], flip=False, clip=False, -- GitLab