ADMMutils.py 文件源码

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

项目:sparsecnn 作者: fkiaee 项目源码 文件源码
def ImageProducer_imagenet(filename_queue,isotropic):
    line_reader = tf.TextLineReader()
    key, line = line_reader.read(filename_queue)
     # line_batch or line (depending if you want to batch)
    filename, label = tf.decode_csv(line,record_defaults=[tf.constant([],dtype=tf.string),tf.constant([],dtype=tf.int32)],field_delim=' ')
    file_contents = tf.read_file(filename)
    example = tf.image.decode_jpeg(file_contents)
    processed_img = process_image(example,isotropic)
    # Convert from RGB channel ordering to BGR This matches, for instance, how OpenCV orders the channels.
    processed_img = tf.reverse(processed_img, [False, False, True])  
    #processed_img.set_shape([224, 224, 3])
    return processed_img, label
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号