title: merge three images with Tensorflow with indices
body: <p>I have a problem with using Tensorflow. I have four images with their corresponding indices. I want to make an image from them. I tried for loops, tf.gather, tf.assign, and so on but all show error. If somebody help me, it would be really appreciated. I explain my question with one small example:
  We have 4 tensors and their indices from tensor tf.ktop function: (I write like MATLAB for just for simplicity) </p>
  
  <p><code>a = [1, 2; 5, 6]   a_idx = [0, 1; 2, 3]
   b = [3, 4; 7, 8]   b_idx = [0, 1; 2, 3]
   c = [9, 10; 13, 14]   c_idx = [0, 1; 2, 3]
   d = [11, 12; 15, 16]   d_idx = [0, 1; 2, 3]</code></p>
  
  <p>I am looking for a big image from a, b, c, and d and their indices like:</p>
  
  <p><code>image = [a b; c d]
   image = [1, 2, 3, 4; 5, 6, 7, 8;9 10, 11, 12;13, 14, 15, 16]</code></p>
  
  <p>In python I have something like:</p>
  
  <pre><code>a, a_idx, b, b_idx, c, c_idx, d, d_idx
  
  n_x = tf.Variable(tf.zeros([1, 4, 4, 1]))
  
  n_patches = tf.extract_image_patches(
      n_x,
      [1, 2, 2, 1],
      [1, 2, 2, 1],
      [1, 1, 1, 1],
      "SAME"
  )
  </code></pre>
  
  <p>So, n_patches is 4 tensors and I need to put a to d values to each patch corresponding to a_idx to d_idx. Its really easy for me in MATLAB or Numpy to do that using for loop but in tensorflow I can not </p>