Skip to content

Commit 9538da8

Browse files
mys007Martin Simonovsky
andauthored
fix types (#2299)
Signed-off-by: Martin Simonovsky <martin.simonovsky@bosch.com> Co-authored-by: Martin Simonovsky <martin.simonovsky@bosch.com>
1 parent baf5ad0 commit 9538da8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tf2onnx/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ def make_onnx_node_with_attr(op_type: str, inputs: Sequence[str], outputs: Seque
198198
valid_attrs = {}
199199
if kwargs:
200200
for key, value in sorted(kwargs.items()):
201-
if not isinstance(value, bytes) and \
202-
isinstance(value, collections.abc.Sequence) and len(list(value)) == 0:
201+
if not isinstance(value, (bytes, str)) and \
202+
isinstance(value, collections.abc.Iterable) and len(list(value)) == 0:
203203
attr_empty_lists[key] = value
204204
else:
205205
valid_attrs[key] = value

0 commit comments

Comments
 (0)