Skip to content

Commit

Permalink
Merge pull request #792 from wjj19950828/Fixed_ConvTranspose
Browse files Browse the repository at this point in the history
Fixed ONNX ConvTranspose
  • Loading branch information
jiangjiajun committed May 10, 2022
2 parents 6ae7d63 + f42e26d commit 3da0e06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x2paddle/op_mapper/onnx2paddle/opset9/opset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2354,7 +2354,8 @@ def ConvTranspose(self, node):
output_size = node.get_attr('output_shape', [])
pads = node.get_attr('pads', [0] * (convnd * 2))

paddings, var_x = self._pad_if_asymmetric(node, pads, val_x)
paddings = np.array(pads).reshape((2, -1)).transpose().astype("int32")
paddings = paddings.flatten().tolist()

if len(output_size) != 0:
paddings = [0] * 4
Expand Down

0 comments on commit 3da0e06

Please sign in to comment.