Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tf2onnx/graph_matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def __init__(self, op_type, name=None, inputs=None):
input_pattern if isinstance(input_pattern, OpTypePattern) else
OpTypePattern(input_pattern) for input_pattern in inputs
]
self.op_type_set = set(op_type.split('|')) if op_type else set()

@property
def op_type(self):
Expand Down Expand Up @@ -154,7 +155,7 @@ def _is_op_type_same(op, pattern):
if pattern.op_type == "*":
return True

if op.type in pattern.op_type.split('|'):
if op.type in pattern.op_type_set:
return True

return False
Expand Down