title: feeding a convolutional neural network with variable sized inputs in tensorflow
body: <p>I am trying to pass a list of 2d numpy arrays with different sizes to a convolutional neural network using feed_dict parameter.</p>
  
  <p><code>x = tf.placeholder(tf.float32, [batch_size, None, None, None])
  y = tf.placeholder(tf.float32, [batch_size, 1])
  optimizer = tf.train.AdamOptimizer(learning_rate=learning_rate).minimize(cost)
  optimizer.run(feed_dict={x: batch[0], y: batch[1], keep_prob: 0.5})</code></p>
  
  <p>and I am getting the following error :</p>
  
  <p><code>ValueError: setting an array element with a sequence.</code></p>
  
  <p>I understood that batch[0] has to contain arrays with the same size.
  I am trying to find a way to apply the optimization using variable sized batch of arrays but all the suggested solutions ask to resize the arrays which is not possible in my case because these arrays are not images and contain DNA Fragments with different sizes (any modifications on any element of the array will cause a lost of important information) </p>
  
  <p>Anyone has an idea ?</p>