Skip to content

Commit

Permalink
string attributes bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PINTO0309 committed Jun 7, 2022
1 parent bc314df commit 3e15658
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sog4onnx/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from sog4onnx.onnx_operation_generator import generate, main

__version__ = '1.0.11'
__version__ = '1.0.12'
7 changes: 6 additions & 1 deletion sog4onnx/onnx_operation_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,12 @@ def main():
# parse
attr_name = attribute[0]
attr_type = attribute[1]
attr_value = ast.literal_eval(attribute[2])
if attr_type == 'string':
attr_type = 'str'
if attr_type != 'str':
attr_value = ast.literal_eval(attribute[2])
else:
attr_value = attribute[2]

# dtype check
if attr_type not in AVAILABLE_DTYPES:
Expand Down

0 comments on commit 3e15658

Please sign in to comment.