code: def _convert_resize(node, graph, err):
      if not USE_DECONV_AS_UPSAMPLE:
          # print(node, graph)
          node_name = node.name
          input_name = str(node.inputs[0])
          output_name = str(node.outputs[0])
          # print(node.attrs, node_name, input_name, output_name)
          layer = myf(
              "Upsample",
              node_name,
              [input_name],
              [output_name],
              upsample_param=dict(scale=2),
          )
  
          graph.channel_dims[output_name] = graph.channel_dims[
              input_name
          ]
      else:
          print("add resize deconv operator")
          factor = 2
          node_name = node.name
          input_name = str(node.inputs[0])
          output_name = str(node.outputs[0])
          # input_shape = graph.shape_dict[input_name]
          # channels = input_shape[1]
          channels = graph.channel_dims[input_name]
          pad = int(math.ceil((factor - 1) / 2.0))
          layer = myf(
              "Deconvolution",
              node_name,
              [input_name],
              [output_name],
              convolution_param=dict(
                  num_output=channels,
                  kernel_size=factor,
                  stride=factor,
                  group=channels,
                  bias_term=False,
              ),
          )
          graph.channel_dims[output_name] = graph.channel_dims[
              input_name
          ]
      return layer
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from caffe import params
  import math
  import numpy
  from ._graph import Node, Graph
  from MyCaffe import Function
label_desc: Use image node_id 15 for calling a global function with example usage: _convert_resize(node, graph, err) and returns: layer