We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I downloaded tiny yolo v2 model from https://github.com/onnx/models/tree/main/vision/object_detection_segmentation/tiny-yolov2 And when inferencing this, I got those outputs from Valgrind
==178736== Invalid read of size 1 ==178736== at 0x162DF9: shash (onnxconf.h:146) ==178736== by 0x162F11: MaxPool_init (MaxPool.c:38) ==178736== by 0x113FF0: onnx_graph_alloc (onnx.c:1238) ==178736== by 0x10FCFA: onnx_context_alloc (onnx.c:102) ==178736== by 0x10FF35: onnx_context_alloc_from_file (onnx.c:145)
==178736== Invalid write of size 1 ==178736== at 0x1154F1: onnx_attribute_read_string (onnx.c:1747) ==178736== by 0x162F09: MaxPool_init (MaxPool.c:38) ==178736== by 0x113FF0: onnx_graph_alloc (onnx.c:1238) ==178736== by 0x10FCFA: onnx_context_alloc (onnx.c:102) ==178736== by 0x10FF35: onnx_context_alloc_from_file (onnx.c:145)
==178736== Invalid read of size 1 ==178736== at 0x13BEB8: shash (onnxconf.h:146) ==178736== by 0x13BFD1: Conv_init (Conv.c:43) ==178736== by 0x113FF0: onnx_graph_alloc (onnx.c:1238) ==178736== by 0x10FCFA: onnx_context_alloc (onnx.c:102) ==178736== by 0x10FF35: onnx_context_alloc_from_file (onnx.c:145)
==178736== Invalid write of size 1 ==178736== at 0x1154F1: onnx_attribute_read_string (onnx.c:1747) ==178736== by 0x13BFC9: Conv_init (Conv.c:43) ==178736== by 0x113FF0: onnx_graph_alloc (onnx.c:1238) ==178736== by 0x10FCFA: onnx_context_alloc (onnx.c:102) ==178736== by 0x10FF35: onnx_context_alloc_from_file (onnx.c:145)
==178736== ERROR SUMMARY: 30 errors from 4 contexts (suppressed: 0 from 0)
The text was updated successfully, but these errors were encountered:
solved this by changing this function in onnx.c
onnx.c
char * onnx_attribute_read_string(struct onnx_node_t * n, const char * name, char * def) { Onnx__AttributeProto * attr = onnx_search_attribute(n, name); if(attr && (attr->type == ONNX__ATTRIBUTE_PROTO__ATTRIBUTE_TYPE__STRING)) { if(attr->s.len > 0) { attr->s.data=realloc(attr->s.data,attr->s.len+1); if(attr->s.data==NULL) return def; attr->s.data[attr->s.len] = 0; return (char *)attr->s.data; } } return def; }
Sorry, something went wrong.
No branches or pull requests
I downloaded tiny yolo v2 model from https://github.com/onnx/models/tree/main/vision/object_detection_segmentation/tiny-yolov2
And when inferencing this, I got those outputs from Valgrind
==178736== Invalid read of size 1
==178736== at 0x162DF9: shash (onnxconf.h:146)
==178736== by 0x162F11: MaxPool_init (MaxPool.c:38)
==178736== by 0x113FF0: onnx_graph_alloc (onnx.c:1238)
==178736== by 0x10FCFA: onnx_context_alloc (onnx.c:102)
==178736== by 0x10FF35: onnx_context_alloc_from_file (onnx.c:145)
==178736== Invalid write of size 1
==178736== at 0x1154F1: onnx_attribute_read_string (onnx.c:1747)
==178736== by 0x162F09: MaxPool_init (MaxPool.c:38)
==178736== by 0x113FF0: onnx_graph_alloc (onnx.c:1238)
==178736== by 0x10FCFA: onnx_context_alloc (onnx.c:102)
==178736== by 0x10FF35: onnx_context_alloc_from_file (onnx.c:145)
==178736== Invalid read of size 1
==178736== at 0x13BEB8: shash (onnxconf.h:146)
==178736== by 0x13BFD1: Conv_init (Conv.c:43)
==178736== by 0x113FF0: onnx_graph_alloc (onnx.c:1238)
==178736== by 0x10FCFA: onnx_context_alloc (onnx.c:102)
==178736== by 0x10FF35: onnx_context_alloc_from_file (onnx.c:145)
==178736== Invalid write of size 1
==178736== at 0x1154F1: onnx_attribute_read_string (onnx.c:1747)
==178736== by 0x13BFC9: Conv_init (Conv.c:43)
==178736== by 0x113FF0: onnx_graph_alloc (onnx.c:1238)
==178736== by 0x10FCFA: onnx_context_alloc (onnx.c:102)
==178736== by 0x10FF35: onnx_context_alloc_from_file (onnx.c:145)
==178736== ERROR SUMMARY: 30 errors from 4 contexts (suppressed: 0 from 0)
The text was updated successfully, but these errors were encountered: