code: def bilinear_kernel(in_channels, out_channels, kernel_size):
      """
      Bilinear interpolation using transposed convolution
      https://github.com/d2l-ai/d2l-en/blob/master/chapter_computer-vision/fcn.md
      """
      factor = (kernel_size + 1) // 2
      if kernel_size % 2 == 1:
          center = factor - 1
      else:
          center = factor - 0.5
      og = onp.ogrid[:kernel_size, :kernel_size]
      filt = (1 - abs(og[0] - center) / factor) * (
          1 - abs(og[1] - center) / factor
      )
      weight = onp.zeros(
          (in_channels, out_channels, kernel_size, kernel_size),
          dtype="float32",
      )
      weight[range(in_channels), range(out_channels), :, :] = filt
      return mx.np.array(weight)
  
file_path: mxnet/tests/nightly/estimator/test_estimator_cnn.py
imports: import os
  import sys
  import mxnet
  import numpy
  from mxnet import gluon, init, nd
  from mxnet.gluon import data
  from mxnet.gluon.contrib.estimator import estimator
  from mxnet.gluon.model_zoo import vision
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: bilinear_kernel(in_channels, out_channels, kernel_size) and returns: mx