def tf_ops(self, capacity=32):
images = ops.convert_to_tensor(self._image_fn_list, dtype=dtypes.string)
labels = ops.convert_to_tensor(self._label_list, dtype=dtypes.int32)
# Makes an input queue
im_fn_q, labl_q = tf.train.slice_input_producer(
[images, labels], capacity=capacity, shuffle=True)
file_contents_q = tf.read_file(im_fn_q)
im_q = self._decoder(file_contents_q, channels=3)
return im_q, labl_q
评论列表
文章目录