input.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:facial-emotion-detection-dl 作者: dllatas 项目源码 文件源码
def generate_train_batch(label, image, batch_size=FLAGS.batch_size):
    num_preprocess_threads = 1
    min_fraction_of_examples_in_queue = 0.5
    min_queue_examples = int(NUM_EXAMPLES_PER_EPOCH_FOR_TRAIN * min_fraction_of_examples_in_queue)
    images, label_batch = tf.train.shuffle_batch(
        [image, label],
        batch_size=batch_size,
        num_threads=num_preprocess_threads,
        capacity=min_queue_examples + 3 * batch_size,
        # capacity=4,
        min_after_dequeue=min_queue_examples
        # min_after_dequeue=1
        )
    tf.image_summary('images', images)
    return images, tf.reshape(label_batch, [batch_size])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号