diff --git a/x2paddle/op_mapper/dygraph/caffe2paddle/caffe_shape.py b/x2paddle/decoder/caffe_shape_inference.py similarity index 99% rename from x2paddle/op_mapper/dygraph/caffe2paddle/caffe_shape.py rename to x2paddle/decoder/caffe_shape_inference.py index 5368b2864879864c2e66e47d6ddf89d39d8293a6..2996233454ba71309e8854652135eb6dae0fbecc 100644 --- a/x2paddle/op_mapper/dygraph/caffe2paddle/caffe_shape.py +++ b/x2paddle/decoder/caffe_shape_inference.py @@ -83,6 +83,10 @@ def shape_convolution(layer, input_shape): return get_strided_kernel_output_shape(params, input_shape[0], math.floor) +def shape_depthwiseconvolution(layer, input_shape): + return shape_convolution(layer, input_shape) + + def shape_deconvolution(layer, input_shape): h_i = input_shape[0][2] diff --git a/x2paddle/op_mapper/dygraph/onnx2paddle/opset9/opset.py b/x2paddle/op_mapper/dygraph/onnx2paddle/opset9/opset.py index 834d2c9e3a7a516d37616b66e35a9b98133177c9..f78205f4e1d2e6d8b9233ceea9abd99bfaca881d 100644 --- a/x2paddle/op_mapper/dygraph/onnx2paddle/opset9/opset.py +++ b/x2paddle/op_mapper/dygraph/onnx2paddle/opset9/opset.py @@ -112,7 +112,7 @@ class OpSet9(): dict(alpha='negative_slope'), dict(negative_slope=.01)], 'Elu': ['paddle.nn.functional.elu', - dict(), + dict(alpha='alpha'), dict(alpha=1.)], 'ThresholdedRelu': ['paddle.nn.functional.thresholded_relu', dict(alpha='threshold'), @@ -121,11 +121,11 @@ class OpSet9(): 'Sigmoid': ['paddle.nn.Sigmoid'], 'Softsign': ['paddle.nn.Softsign'], 'Softplus': ['paddle.nn.Softplus', - dict(), + dict(threshold='threshold'), dict(threshold=float(sys.maxsize))], 'Exp': ['paddle.exp'], 'Softmax': ['paddle.nn.Softmax', - dict(), + dict(axis='axis'), dict(axis=1)], 'Sqrt': ['paddle.sqrt'], 'Floor': ['paddle.floor'],