For a softmax regression program using tensorflow in python, I want to get my 1000 jpeg image files as a 2D tensor x of: [image index, pixel index]. The "image index" is the image and the pixel index is a specific image pixel for that image. The model equation is:
y = tf.nn.softmax(tf.matmul(x, W) + b)
where:
x = tf.placeholder(tf.float32, [None, image_size])
W = tf.Variable(tf.zeros([image_size, classes]))
b = tf.Variable(tf.zeros([classes]))
image size = height*width of image (constant for all images).
What is the best way in tensorflow to get my image files in that form?