Forums - Resize_bilinear give the incorrect output

3 posts / 0 new
Last post
Resize_bilinear give the incorrect output
liliang58
Join Date: 31 Aug 21
Posts: 2
Posted: Tue, 2021-09-07 04:13

Hi, everyone,

I have encountered the resize problem, that the output of snpe_resize operation varies a lot from that of Pytorch's interpolate. e.g.  an upsample resize (13x13 -> 26x26).  

Could you kindly help me with this issue? Is the upsample resize unsupported in snpe yet? 

btw, I use the version of snpe-1.53.2, python-3.6.9, opset_version=10 (export onnx)

  • Up0
  • Down0
lanle
Join Date: 6 Apr 21
Posts: 2
Posted: Sun, 2021-09-19 13:52

I'm not sure if the information I'm about to provide will be useful to you or not. But I've had issues with SNPE Resize bilinear as well. I think because when the layers is quantized and run on DSP (my assumption this is your setup), it cause the bilinear interpolation to be not what we expected. Instead, I switch to Nearest mode. In my experience, "nearest" doesn't degrade the model's performance, yet seemed to perform much better when quantized.

  • Up0
  • Down0
liliang58
Join Date: 31 Aug 21
Posts: 2
Posted: Tue, 2021-09-21 20:11

Thanks a lot for your reply. I try the "nearest" mode and it works!!! BTW, the bilinear interpolation output incorrect result ont only with qquantized model but also for the float mode. I found that the part of the interpolated pixels output incorrect but others right. This may be caused by their transformation matrix.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.