diff --git a/caffe2fluid/kaffe/custom_layers/normalize.py b/caffe2fluid/kaffe/custom_layers/normalize.py index f6e8c00fb126009c5724fa6509c32c2b8c96bace..ec2eb147b93bfe67bfc67ad98b4b1186a39dd6c9 100644 --- a/caffe2fluid/kaffe/custom_layers/normalize.py +++ b/caffe2fluid/kaffe/custom_layers/normalize.py @@ -47,7 +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) - 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 e3eb6407caa7660347f81452b9668028eded81d5..f1d3135a461e0b4cd066ca9f93b06b62bc10541b 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, diff --git a/caffe2fluid/kaffe/net_template.py b/caffe2fluid/kaffe/net_template.py index f9387c9dd8ed007017b92107e762e687bbeee696..c6810c67bfc7d52bad86c0170fca102d40379091 100644 --- a/caffe2fluid/kaffe/net_template.py +++ b/caffe2fluid/kaffe/net_template.py @@ -100,7 +100,7 @@ def main(): npy_weight = args.npy_path fluid_model = args.model_param_path outputs = None - if len(sys.argv) >= 6: + if args.need_layers_name: outputs = args.need_layers_name.split(',') ret = MyNet.convert(npy_weight, fluid_model, outputs)