I would like to deploy the pre-trained yolov3 detector to an ONNX model for inference. The function 'exportONNXNetwork' reports warnings that some layers may change the behavior. I tried the following example to download the yolov3 pretrained network:
After downloading the mat file in the yolov3 example, below is the step to reproduce the warning:
>> load('yolov3SqueezeNetVehicleExample_21aSPKG.mat')>> exportONNXNetwork(detector.Network, 'test.onnx')Warning: Cannot exactly export Layer 'featureResize2' with 'GeometricTransformMode' set to'half-pixel' for 'OpsetVersion' '8'. Exported network may produce different results.> In nnet.internal.cnn.onnx/ConverterForResizeLayers/toOnnx (line 57)In nnet.internal.cnn.onnx/ConverterForNetwork/networkToGraphProto (line 114)In nnet.internal.cnn.onnx/ConverterForNetwork/toOnnx (line 44)In nnet.internal.cnn.onnx.exportONNXNetwork (line 36)In exportONNXNetwork (line 38)Warning: Cannot exactly export Layer 'featureResize2' with 'NearestRoundingMode' set to'round' for 'OpsetVersion' '8'. Exported network may produce different results.> In nnet.internal.cnn.onnx/ConverterForResizeLayers/toOnnx (line 60)In nnet.internal.cnn.onnx/ConverterForNetwork/networkToGraphProto (line 114)In nnet.internal.cnn.onnx/ConverterForNetwork/toOnnx (line 44)In nnet.internal.cnn.onnx.exportONNXNetwork (line 36)
Is there a workaround for this problem? It seems like 'featureResize2' is not compatible with onnx format.
Best Answer