• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






天生自然

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理
上一页 1 ··· 249 250 251 252 253 254 255 256 257 ··· 276 下一页

2019年5月18日

吴裕雄 python 神经网络——TensorFlow 输入数据处理框架
摘要: import tensorflow as tf files = tf.train.match_filenames_once("E:\\MNIST_data\\output.tfrecords") filename_queue = tf.train.string_input_producer(files, shuffle=False) # 读取文件。 reader = tf.TFRecor... 阅读全文
posted @ 2019-05-18 12:51 吴裕雄 阅读(339) 评论(0) 推荐(0)
 
吴裕雄 python 神经网络——TensorFlow 输入文件队列
摘要: import tensorflow as tf def _int64_feature(value): return tf.train.Feature(int64_list=tf.train.Int64List(value=[value])) num_shards = 2 instances_per_shard = 2 for i in range(num_shards): ... 阅读全文
posted @ 2019-05-18 12:48 吴裕雄 阅读(235) 评论(0) 推荐(0)
 
吴裕雄 python 神经网络——TensorFlow 多线程队列操作
摘要: import tensorflow as tf queue = tf.FIFOQueue(100,"float") enqueue_op = queue.enqueue([tf.random_normal([1])]) qr = tf.train.QueueRunner(queue, [enqueue_op] * 5) tf.train.add_queue_runner(qr) out_ten... 阅读全文
posted @ 2019-05-18 12:42 吴裕雄 阅读(467) 评论(0) 推荐(0)
 
吴裕雄 python 神经网络——TensorFlow 队列操作
摘要: import tensorflow as tf q = tf.FIFOQueue(2, "int32") init = q.enqueue_many(([0, 10],)) x = q.dequeue() y = x + 1 q_inc = q.enqueue([y]) with tf.Session() as sess: init.run() for _ in range(5... 阅读全文
posted @ 2019-05-18 12:39 吴裕雄 阅读(243) 评论(0) 推荐(0)
 
吴裕雄 python 神经网络——TensorFlow 图像预处理完整样例
摘要: import numpy as np import tensorflow as tf import matplotlib.pyplot as plt def distort_color(image, color_ordering=0): if color_ordering == 0: image = tf.image.random_brightness(image, m... 阅读全文
posted @ 2019-05-18 12:27 吴裕雄 阅读(325) 评论(0) 推荐(0)
 
吴裕雄 python 神经网络——TensorFlow 图像处理函数
摘要: import numpy as np import tensorflow as tf import matplotlib.pyplot as plt image_raw_data = tf.gfile.FastGFile("F:\\TensorFlowGoogle\\201806-github\\datasets\\cat.jpg",'rb').read() with tf.Session... 阅读全文
posted @ 2019-05-18 12:21 吴裕雄 阅读(336) 评论(0) 推荐(0)
 
吴裕雄 python 神经网络——TensorFlow TFRecord样例程序
摘要: import numpy as np import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data # 定义函数转化变量类型。 def _int64_feature(value): return tf.train.Feature(int64_list=tf.train.Int64Li... 阅读全文
posted @ 2019-05-18 12:11 吴裕雄 阅读(311) 评论(0) 推荐(0)
 
吴裕雄 python 神经网络——TensorFlow 花瓣分类与迁移学习(4)
摘要: # -*- coding: utf-8 -*- import glob import os.path import numpy as np import tensorflow as tf from tensorflow.python.platform import gfile import tensorflow.contrib.slim as slim import tensorflow.c... 阅读全文
posted @ 2019-05-18 11:36 吴裕雄 阅读(386) 评论(0) 推荐(0)
 
吴裕雄 python 神经网络——TensorFlow 花瓣分类与迁移学习(3)
摘要: import glob import os.path import numpy as np import tensorflow as tf from tensorflow.python.platform import gfile import tensorflow.contrib.slim as slim # 因为slim.nets包在 tensorflow 1.3 中有一些问题,所以这里为了... 阅读全文
posted @ 2019-05-18 11:22 吴裕雄 阅读(440) 评论(0) 推荐(0)
 
吴裕雄 python 神经网络——TensorFlow 花瓣分类与迁移学习(2)
摘要: import glob import os.path import numpy as np import tensorflow as tf from tensorflow.python.platform import gfile # 原始输入数据的目录,这个目录下有5个子目录,每个子目录底下保存这属于该 # 类别的所有图片。 INPUT_DATA = 'F:\\TensorFlowGoogle... 阅读全文
posted @ 2019-05-18 10:41 吴裕雄 阅读(642) 评论(0) 推荐(0)
 
上一页 1 ··· 249 250 251 252 253 254 255 256 257 ··· 276 下一页