code: def inverse_tile_2d(input, k_x, k_y, name):
      
  
      batch_size, h, w, c = input.get_shape().as_list()
      if batch_size is None:
          batch_size = -1
  
      # Check if tiling is possible and define output shape.
      assert w % k_x == 0 and h % k_y == 0
  
      # Actual inverse tilining
      with tf.variable_scope(name) as scope:
          tmp = input
          tmp = tf.reshape(tmp, (batch_size, int(h * k_y), w, int(c * k_x)))
          tmp = tf.transpose(tmp, [0, 2, 1, 3])
          tmp = tf.reshape(tmp, (batch_size, w, h, int(c * k_y * k_x)))
          tmp = tf.transpose(tmp, [0, 2, 1, 3])
  
      return tmp
docs: An inverse tiling layer.
  
          An inverse to the tiling layer can be of great use, since you can keep the resolution of your output low,
          but harness the benefits of the resolution of a higher level feature layer.
          If you insist on a source you can call it very lightly inspired by yolo9000 "passthrough layer".
  
          :param input: Your input tensor. (Assert input.shape[1] % k_y = 0 and input.shape[2] % k_x = 0)
          :param k_x: The tiling factor in x direction [int].
          :param k_y: The tiling factor in y direction [int].
          :param name: The name of the layer.
          :return: The output tensor of shape [batch_size, inp.height / k_y, inp.width / k_x, inp.channels * k_x * k_y].