code: def ref_deconvolution_2d(
      x,
      w,
      b,
      base_axis,
      pad,
      stride,
      dilation,
      group,
      channel_last=False,
      output_padding=(0, 0),
  ):
      if channel_last:
          transpose_x = refs.ChannelLastToFirstTranspose(
              x.ndim, len(pad)
          )
          transpose_w = refs.ChannelLastToFirstTranspose(
              w.ndim, len(pad)
          )
          return transpose_x.inv(
              ref_deconvolution_2d(
                  transpose_x(x),
                  transpose_w(w),
                  b,
                  base_axis,
                  pad,
                  stride,
                  dilation,
                  group,
                  False,
                  output_padding,
              )
          )
  
      y = []
      for xx in x.reshape((-1,) + x.shape[base_axis:]):
          y += [
              refs.deconvolution_2d(
                  xx,
                  w,
                  b,
                  pad,
                  stride,
                  dilation,
                  group,
                  output_padding=output_padding,
              )[np.newaxis]
          ]
      y = np.vstack(y)
      return y.reshape(x.shape[:base_axis] + y.shape[1:])
  
file_path: nnabla/python/test/function/test_deconvolution.py
imports: from __future__ import division
  import pytest
  import numpy
  import nnabla.functions
  import refs
  from nbla_test_utils import list_context
label_desc: Use image node_id 1 for calling a global function with example usage: ref_deconvolution_2d(x, w, b, base_axis, pad, stride, dilation, group, channel_last, output_padding) and returns: y, transpose_x