code: def interpolate_bilinear_gpu(x, v, u, vw, uw):
      B, C, H, W = x.shape
      out_H, out_W = v.shape
      y = cuda.cupy.empty((B, C, out_H, out_W), dtype=x.dtype)
  
      cuda.elementwise(
          "raw T x, S v, S u, T vw, T uw, S H, S W, S outsize",
          "T y",
          """
          // indices
          S v0 = v;
          S v1 = min(v + 1, (S)(H - 1));
          S u0 = u;
          S u1 = min(u + 1, (S)(W - 1));
          // weights
          T w0 = (1 - vw) * (1 - uw);
          T w1 = (1 - vw) * uw;
          T w2 = vw * (1 - uw);
          T w3 = vw * uw;
          // fetch
          S offset = i / outsize * H * W;
          T px0 = x[offset + v0 * W + u0];
          T px1 = x[offset + v0 * W + u1];
          T px2 = x[offset + v1 * W + u0];
          T px3 = x[offset + v1 * W + u1];
          // interpolate
          y = (w0 * px0 + w1 * px1) + (w2 * px2 + w3 * px3);
          """,
          "resize_images_interpolate_bilinear",
      )(x, v, u, vw, uw, H, W, out_H * out_W, y)
      return y
  
imports: from __future__ import division
  import numpy
  from chainer import backend
  from chainer.backends import cuda
  from chainer import function_node
  from chainer.utils import type_check
label_desc: Use image node_id 3 for calling a global function with example usage: interpolate_bilinear_gpu(x, v, u, vw, uw) and returns: y