I want to train a network with planar curves, which I represent as numpy arrays with shape (L,2) . The number 2 indicates the x, y coordinates, and L is the number of points changing in my dataset. I consider x, y as two different "channels".
I implemented the next_batch(batch_size) function, which provides the next batch as a 1D numpy array with the form (batch_size,) containing elements that are 2D arrays with the form: (L,2) . These are my curves, and as mentioned earlier, L is different between the elements. (I did not want to be limited to a fixed number of points on the curve).
My question is:
How can I manipulate the next_batch() from next_batch() , so I can feed the network using input curves using a scheme similar to the one that appears in the Tensorflow tutorial: https://www.tensorflow.org/get_started/mnist/pros
ie using the feed_dict mechanism. In this tourial, the input size was fixed in the code line of the textbook:
train_step.run(feed_dict={x: batch[0], y_: batch[1], keep_prob: 0.5})
batch[0] has a fixed form: (50,784) (50 = # samples, 784 = #pixels)
I cannot convert my input to a numpy array with the form (batch_size,L,2) since the array must have a fixed size in each dimension. So what can I do?
I already defined a placeholder (which may have an unknown size):
but how can I feed him properly?
Thank you very much