-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
P2Priority of the issue for triage purpose: Needs to be fixed at some point.Priority of the issue for triage purpose: Needs to be fixed at some point.onnxExporting ONNX models or loading ONNX modelsExporting ONNX models or loading ONNX modelsusabilitySmoothing user interaction or experienceSmoothing user interaction or experience
Description
What is the purpose that Google.Protobuf.CodedInputStream.RecursionLimit is set 10 at the following code?
| using (var codedStream = Google.Protobuf.CodedInputStream.CreateWithLimits(modelStream, Int32.MaxValue, 10)) |
It is set 100 by default in protocol-buffers C#-wrapper.
internal const int DefaultRecursionLimit = 100;
I could not load some network / .onnx file by the following exception be caused by RecursionLimit = 10 without the monkey-patched Microsoft.ML.OnnxTransformer.dll.
Google.Protobuf.InvalidProtocolBufferException: Protocol message had too many levels of nesting. May be malicious. Use CodedInputStream.SetRecursionLimit() to increase the depth limit.
I think that the networks are including Inception construction especially.
(ex. tensorflow/models`s Faster-RCNN-Inception-V2 converted)
Thank you for coding great tools!
Metadata
Metadata
Assignees
Labels
P2Priority of the issue for triage purpose: Needs to be fixed at some point.Priority of the issue for triage purpose: Needs to be fixed at some point.onnxExporting ONNX models or loading ONNX modelsExporting ONNX models or loading ONNX modelsusabilitySmoothing user interaction or experienceSmoothing user interaction or experience