上一页 1 2 3 4 5 6 7 8 9 ··· 49 下一页
摘要: import tensorflow as tf FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_string("job_name", " ", "启动服务的类型ps or worker") tf.app.flags.DEFINE_integer("tas 阅读全文
posted @ 2020-03-31 00:31 kog_maw 阅读(124) 评论(0) 推荐(0) 编辑
摘要: import tensorflow as tf FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_string("captcha_dir", "./tfrecords", "验证码数据路径") tf.app.flags.DEFINE_integer("ba 阅读全文
posted @ 2020-03-31 00:30 kog_maw 阅读(122) 评论(0) 推荐(0) 编辑
摘要: import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data # TensorFlow中提供的演示数据 """ 卷积神经网络重要概念:分为卷积层,激活,池化层,全连接层 卷积层中的卷积核包含权重系 阅读全文
posted @ 2020-03-31 00:29 kog_maw 阅读(198) 评论(0) 推荐(0) 编辑
摘要: import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data # TensorFlow中提供的演示数据 """ 神经网络的一些重要概念: 全连接层:第N层和第N-1层之间的部分 输出:有几个类别就 阅读全文
posted @ 2020-03-30 16:39 kog_maw 阅读(199) 评论(0) 推荐(0) 编辑
摘要: import tensorflow as tf import os """ TFRecords数据格式:是TensorFlow设计的一种内置文件格式,是一种二进制文件,它能更好的利用内存,更方便的复制和移动 为了解决将二进制数据和标签(训练的类别标签)数据存储在不同同一个文件中的问题,TFRecor 阅读全文
posted @ 2020-03-30 16:34 kog_maw 阅读(155) 评论(0) 推荐(0) 编辑
摘要: import tensorflow as tf import os """ uint8:存储,节约空间,比如在图片处理时,图片解码之前 float32:矩阵计算,提高精度,比如在图片处理时,图片解码之后 """ # 训练数据连接:http://www.cs.toronto.edu/~kriz/cif 阅读全文
posted @ 2020-03-30 13:14 kog_maw 阅读(237) 评论(0) 推荐(0) 编辑
摘要: import tensorflow as tf import os """ 黑白照:单通道,灰度值[0~255],一个像素点一个值 彩色照:三通道,RGB,一个像素点三个值,同样像素,彩色是黑白数据量的3倍 图片的张量表示:[100, 300, 1],100表示长,300表示宽,1表示通道数 图形需 阅读全文
posted @ 2020-03-30 13:10 kog_maw 阅读(190) 评论(0) 推荐(0) 编辑
摘要: import tensorflow as tf import os ''' tensorflow读取文件的流程,每一步每一种数据都有对应封装好的API进行处理: 1、构造一个文件队列:A文件,B文件,C文件,每个文件内有100个样本 2、读取队列内容:一个一个样本读取,二进制文件就是指定一个样本的b 阅读全文
posted @ 2020-03-30 13:03 kog_maw 阅读(187) 评论(0) 推荐(0) 编辑
摘要: import tensorflow as tf # 模拟:异步子线程存入样本,主线程读取样本 # 1.定义一个队列,容量10000 q = tf.FIFOQueue(1000, tf.float32) # 2.创建一个变量,用assign_add实现自增 var1 = tf.Variable(0.0 阅读全文
posted @ 2020-03-30 12:55 kog_maw 阅读(94) 评论(0) 推荐(0) 编辑
摘要: import tensorflow as tf import os # 定义命令行参数,"max_step", 100, "模型训练的步数", 三个参数都是必须的,max_step在程序中引用的变量名,100是给第一个参数设置的默认值,第三个参数是第一个参数的参数说明 tf.app.flags.DE 阅读全文
posted @ 2020-03-30 12:44 kog_maw 阅读(133) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 49 下一页