Skip to content

Commit b8d0782

Browse files
committed
use constants
1 parent 19e8346 commit b8d0782

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tf2onnx/custom_opsets/onnx_ml.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ def version_11(cls, ctx, node, **kwargs):
4747
""" utilize contrib cropandresize """
4848
node.attr['method'].name = 'mode'
4949
node.domain = constants.MICROSOFT_DOMAIN
50-
ctx.insert_new_node_on_input(node, "Transpose", node.input[0], perm=[0, 3, 1, 2])
51-
ctx.insert_new_node_on_output("Transpose", node.output[0], node.name + '_transposed', None, perm=[0, 2, 3, 1])
50+
ctx.insert_new_node_on_input(node, "Transpose", node.input[0], perm=constants.NHWC_TO_NCHW)
51+
ctx.insert_new_node_on_output("Transpose", node.output[0], node.name + '_transposed', None, perm=constants.NCHW_TO_NHWC)

0 commit comments

Comments
 (0)