Skip to content

Commit f31b8de

Browse files
author
Alejandro Gaston Alvarez Franceschi
committed
Add support for conv_transpose and add aliases
1 parent 7a07062 commit f31b8de

File tree

1 file changed

+6
-1
lines changed
  • coremltools/converters/mil/frontend/torch

1 file changed

+6
-1
lines changed

coremltools/converters/mil/frontend/torch/ops.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ def linear(context, node):
930930
context.add(res, torch_name=node.name)
931931

932932

933-
@register_torch_op(torch_alias=["conv2d", "convolution"])
933+
@register_torch_op(torch_alias=["convolution", "conv1d", "conv2d", "conv3d", "conv_transpose1d", "conv_transpose2d", "conv_transpose3d"])
934934
def _convolution(context, node):
935935
inputs = _get_inputs(context, node)
936936

@@ -968,6 +968,11 @@ def _convolution(context, node):
968968
transposed = inputs[6].val
969969
out_pad = inputs[7].val
970970
group = inputs[8]
971+
elif len(inputs) == 8:
972+
transposed = True
973+
out_pad = inputs[5].val
974+
dilations = inputs[7]
975+
group = inputs[6]
971976
elif len(inputs) == 7:
972977
transposed = False
973978
group = inputs[6]

0 commit comments

Comments
 (0)