Forums - Resize operator in version 1.2

3 posts / 0 new
Last post
Resize operator in version 1.2
alex_li
Join Date: 4 Sep 19
Posts: 2
Posted: Wed, 2019-09-04 01:56

Hi all,

In version 1.29, the resize operator supports nearest neighbor method which is used in MobileNetV1-FPN-SSD

The structure of nearest neighbor implementation is as follow (lib/python/snpe/converters/tensorflow/layers/resize.py:130): 

NonConsumableConverterSequenceNode('input', ['?']),
ConverterSequenceNode('Shape', ['Shape']),
ConverterSequenceNode('Reshape/shape', ['Pack']),
ConverterSequenceNode('strided_slice', ['StridedSlice']),
ConverterSequenceNode('Reshape', ['Reshape']),
ConverterSequenceNode('Reshape_1/shape', ['Pack']),
ConverterSequenceNode('scale_mul', ['Mul']),
ConverterSequenceNode('root', ['Reshape'])

 

But it seems like it's kind of different from the original implementation in tensorflow (https://github.com/tensorflow/models/blob/a85c40e36fad0ee3754c1046eb8968e50d22bbf8/research/object_detection/utils/ops.py#L936-L974)

Is there anyone know where this implementation come from?

 

  • Up0
  • Down0
jihoonk
Profile picture
Join Date: 28 Jan 13
Location: Seoul
Posts: 55
Posted: Wed, 2019-09-04 02:55

Hi alex_li,

According to SNPE reference guide document, resize operator is from tf.image.resize_nearest_neighbor. You can refer to https://developer.qualcomm.com/docs/snpe/network_layers.html

Thanks,

Jihoonk

  • Up0
  • Down0
alex_li
Join Date: 4 Sep 19
Posts: 2
Posted: Wed, 2019-09-04 20:51

Thanks for your reply at first.

But I thought the operator  tf.image.resize_nearest_neighbor have already implemented in previous version.

According to the object detection api (or Mobilenet V1 FPN SSD), there are two way to do upsampling. (https://github.com/tensorflow/models/blob/fe748d4a4a1576b57c279014ac0ceb47344399c4/research/object_detection/models/feature_map_generators.py#L569-L580)

So I thought the version 1.29 add another implementation about resize operator?

Thanks,

Alex

  • 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.