对于在python中使用tensorflow的softmax回归程序,我想将我的1000个jpeg图像文件作为2D张量x:[image index,pixel index]。 “图像索引”是图像,像素索引是该图像的特定图像像素。 模型等式是:在张量流中获取多个图像文件作为二维张量
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]))
图像尺寸=高*图像的宽度(常数所有图片)。
张量传递中获得图像文件的最佳方式是什么?