Skip to content

Commit fa75b0d

Browse files
author
channings
authored
Merge branch 'develop' into fix_adative_pool
2 parents 3bcd5d6 + 322af23 commit fa75b0d

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

docs/en/model_zoo.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ Due to ONNX's limit, Paddle2ONNX is not able to support all the detection models
4242
|YoloV3_ResNet34|[PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection/blob/release/0.4/docs/MODEL_ZOO.md#yolo-v3) |
4343
|YoloV3_MobileNet|[PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection/blob/release/0.4/docs/MODEL_ZOO.md#yolo-v3) |
4444
|FasterRCNN|[PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection/blob/release/0.4/docs/MODEL_ZOO.md#faster--mask-r-cnn) |
45-
|FasterRCNN_with_DCN|[PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection/blob/release/0.4/docs/MODEL_ZOO.md#deformable-convnets-v2) |
45+
|FasterRCNN_FPN|[PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection/blob/release/0.4/docs/MODEL_ZOO.md#faster--mask-r-cnn) |
46+
|FasterRCNN_FPN_DCN|[PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection/blob/release/0.4/docs/MODEL_ZOO.md#deformable-convnets-v2) |
4647

4748
## Image segmentation
4849
Support UNet,HRNet and DeepLab. Test models are from [PaddleSeg](https://github.com/PaddlePaddle/PaddleSeg).

docs/zh/model_zoo.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
|YoloV3_ResNet34|[PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection/blob/release/0.4/docs/MODEL_ZOO_cn.md#yolo-v3-%E5%9F%BA%E4%BA%8Epasacl-voc%E6%95%B0%E6%8D%AE%E9%9B%86) |
3939
|YoloV3_MobileNet|[PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection/blob/release/0.4/docs/MODEL_ZOO_cn.md#yolo-v3-%E5%9F%BA%E4%BA%8Epasacl-voc%E6%95%B0%E6%8D%AE%E9%9B%86) |
4040
|FasterRCNN|[PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection/blob/release/0.4/docs/MODEL_ZOO_cn.md#faster--mask-r-cnn) |
41-
|FasterRCNN_with_DCN|[PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection/blob/release/0.4/docs/MODEL_ZOO_cn.md#deformable-%E5%8D%B7%E7%A7%AF%E7%BD%91%E7%BB%9Cv2) |
41+
|FasterRCNN_FPN|[PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection/blob/release/0.4/docs/MODEL_ZOO_cn.md#faster--mask-r-cnn) |
42+
|FasterRCNN_FPN_DCN|[PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection/blob/release/0.4/docs/MODEL_ZOO_cn.md#deformable-%E5%8D%B7%E7%A7%AF%E7%BD%91%E7%BB%9Cv2) |
4243

4344
## 图像分割
4445
支持的模型有UNet, HRNet, DeepLab模型,测试模型来自于[PaddleSeg](https://github.com/PaddlePaddle/PaddleSeg)

paddle2onnx/op_mapper/math.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,21 @@ def opset_1(cls, graph, node, **kw):
152152
'MatMul', inputs=[flatten_x, flatten_y], outputs=node.output('Out'))
153153

154154

155+
@op_mapper('affine_channel')
156+
class AffineChannel():
157+
support_opset_version_range = (1, 12)
158+
159+
@classmethod
160+
def opset_1(cls, graph, node, **kw):
161+
x = node.input('X', 0)
162+
bias = node.input('Bias', 0)
163+
scale = node.input('Scale', 0)
164+
scale = graph.make_node('Unsqueeze', inputs=scale, axes=[0, 2, 3])
165+
bias = graph.make_node('Unsqueeze', inputs=bias, axes=[0, 2, 3])
166+
x = graph.make_node('Mul', inputs=[x, scale])
167+
x = graph.make_node('Add', inputs=[x, bias], outputs=node.output('Out'))
168+
169+
155170
@op_mapper('bmm')
156171
class BMM():
157172
support_opset_version_range = (1, 12)

0 commit comments

Comments
 (0)