Skip to content

Commit

Permalink
Modified to give op_name to extrapolated Transpose
Browse files Browse the repository at this point in the history
  • Loading branch information
PINTO0309 committed May 10, 2022
1 parent 24c5ef6 commit 700ef70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scc4onnx/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from scc4onnx.onnx_input_order_converter import order_conversion, main

__version__ = '1.0.1'
__version__ = '1.0.2'
3 changes: 2 additions & 1 deletion scc4onnx/onnx_input_order_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def order_conversion(
transpose_nodes = []
next_nodes = []
if input_op_names_and_order_dims:
for graph_input in graph.inputs:
for transpose_idx, graph_input in enumerate(graph.inputs):
if graph_input.name in new_input_shapes:

# Rewriting of graph input OP variable
Expand All @@ -307,6 +307,7 @@ def order_conversion(
)
transpose = gs.Node(
op="Transpose",
name=f"input_order_convert_transpose_{transpose_idx}",
attrs={"perm": inverted_list[graph_input.name]},
inputs=[graph_input],
outputs=[transpose_out]
Expand Down

0 comments on commit 700ef70

Please sign in to comment.