【发布时间】:2017-12-21 10:03:11
【问题描述】:
我有一个图像列表(尝试使用自定义图像训练 CNN 模型),由以下人员定义和重塑:
reader.images = tf.reshape(self.images, [-1, 256, 256, 3])
哪些打印:
reader.Images :
[[[[ 127. 255. 127.]
[ 140. 255. 114.]
[ 217. 255. 38.]
...,
[[ 255. 240. 0.]
[ 255. 241. 0.]
[ 249. 246. 6.]
...,
[ 203. 237. 52.]
[ 152. 251. 102.]
[ 143. 253. 111.]]
[[ 255. 184. 0.]
[ 248. 192. 7.]
[ 205. 242. 50.]
...,
[ 255. 139. 0.]
[ 255. 171. 0.]
[ 255. 177. 0.]]
[[ 255. 178. 0.]
[ 237. 187. 18.]
[ 131. 240. 124.]
...,
[ 255. 123. 0.]
[ 255. 156. 0.]
[ 255. 162. 0.]]]]
我想通过每次迭代提取一批来训练我的模型。但是当我使用时:
image_batch = tf.train.batch(
[reader.images], batch_size=batch_size, dynamic_pad=True)
batch_size =1
我将整个图像作为输出(与上面打印的整个列表图像相同)。 我是 TensorFlow 的新手,所以欢迎任何提示。
【问题讨论】:
标签: python image tensorflow training-data