Skip to content
Snippets Groups Projects
Commit 6907c12d authored by Yaman Umuroglu's avatar Yaman Umuroglu
Browse files

[CustomOp] encode string attributes correctly

parent 2ceb0097
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,9 @@ class CustomOp(ABC):
if attr is not None:
# dtype indicates which ONNX Attribute member to use
# (such as i, f, s...)
if dtype == "s":
# encode string attributes
value = value.encode("utf-8")
attr.__setattr__(dtype, value)
else:
# not set, create and insert AttributeProto
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment