glow
glow copied to clipboard
Loop operator is not supported
While compiling ssd_mobilenet_v1_coco_2018_01_28 onnx model, got the following error: "Failed to load operator Loop"
Hi @tijithomas, we currently do not support control flow. We would need to unroll the loop for this to work. This means we would need the trip count input to be a constant known at compile time. I'm not familiar with the details of this op so not sure if this is possible.
You can freeze the graph so that loop operator is not present. At least for ssd mobilenet v2. @ksaurabh-cadence
Hi @ayermolo , I tried to use the frozen inference graph from ssd mobilent v2 tensorflow model to convert it into onnx. The generated onnx model still has loop operator. How do you freeze the onnx graph? Can you share your frozen onnx model?
@ayermolo , Also please share the versions of onnx, opset, and tf2onnx (if you used it to convert to onnx).
@jfix71 Are node attributes of type Graph supported in Glow yet?
@tijithomas Did you freeze the model as it is? In our experience updating the pipeline config in the original model to have "use_static_shapes: true" is better since glow doesn't support dynamic shapes. Did you try that? However this might lead to another problem as TF's NMSv4 is not supported in ONNX yet, but can be supported via a custom operator.
@ksaurabh-cadence Thanks for jumping in. :D
Was this ever resolved? The loop in fact is static according to the OONX graph expansion shown (start at 0, 37 iterations, so 0 to 36); it also says the output for iteration 36 is unused, which seems strange. Since all of the normal MobileNet-SSD implementations use this LOOP, doesn't that suggest that handling it by unrolling or otherwise is pretty important?