上一页 1 2 3 4 5 6 7 ··· 21 下一页
摘要: link: https://www.tensorflow.org/guide/saved_model 中文博客:https://blog.csdn.net/Searching_Bird/article/details/78274207 https://blog.csdn.net/mieleizhi0 阅读全文
posted @ 2019-01-24 22:05 simple_wxl 阅读(1370) 评论(0) 推荐(0) 编辑
摘要: Linux shell基本知识 a)">" 与 ">>" 的作用是不一样的,前者使用本次输出内容替换原有文件的内容,后者则是把本次输出追加到原文件的后面。 b) 0、1、2 是系统保留的三个文件描述符,分别对应标准输入、标准输出、标准错误 c) 重定位运算符 ">" ">>" 的默认参数为标准输出 阅读全文
posted @ 2019-01-23 16:46 simple_wxl 阅读(289) 评论(0) 推荐(0) 编辑
摘要: >>> a=np.array([[-2.6, -1.7, -3.2, 0.1], [-2.6, -1.7, 3.2, 0.1]]) >>> z=tf.nn.sparse_softmax_cross_entropy_with_logits(logits=a,labels=[2,2]) >>> sess 阅读全文
posted @ 2019-01-22 20:27 simple_wxl 阅读(175) 评论(0) 推荐(0) 编辑
摘要: a=[1,2,3] b=a #b值改变,a也会改变 b[0]=90 print(a) [90,2,3] b=list(a) #这样修改b,a的值就不会改变 阅读全文
posted @ 2019-01-20 17:27 simple_wxl 阅读(185) 评论(0) 推荐(0) 编辑
摘要: >>> x=[[1,2,3],[23,13,213]] >>> xx=tf.reduce_sum(x) >>> sess.run(xx) 255 >>> x=[90,10,8] >>> tf.reduce_sum(x) >>> sess.run(xx) 108 阅读全文
posted @ 2019-01-19 18:00 simple_wxl 阅读(843) 评论(0) 推荐(0) 编辑
摘要: tf.reduce_mean(x) ==> 2.5 #如果不指定第二个参数,那么就在所有的元素中取平均值 tf.reduce_mean(x, 0) ==> [2., 3.] #指定第二个参数为0,则第一维的元素取平均值,即每一列求平均值 tf.reduce_mean(x, 1) ==> [1.5, 3.5] # 指定第二个参数为1,则第二维的元素取平均值,即每一行求平均值 ... 阅读全文
posted @ 2019-01-18 10:53 simple_wxl 阅读(148) 评论(0) 推荐(0) 编辑
摘要: tf.metrics.accuracy输出两个值,第一个值为上几步的平均精度,第二值是上几步与该步的精度的平均值. 正常的计算单个batch正确率的代码 self.correct_prediction = tf.equal(self.labels,self.labels_pred ) self.ac 阅读全文
posted @ 2019-01-18 10:38 simple_wxl 阅读(1740) 评论(0) 推荐(0) 编辑
摘要: 1.自动管理模式 summary_writer = tf.summary.FileWriter('E:/data/tensorflow-master/1.Cnn_Captcha/result/', flush_secs=60) summary_writer.add_graph(sess.graph) 阅读全文
posted @ 2019-01-17 15:09 simple_wxl 阅读(9205) 评论(0) 推荐(0) 编辑
摘要: 方法一: 使用dict.items()方式 dict_ori = {'A':1, 'B':2, 'C':3} dict_new = {value:key for key,value in dict_ori.items()} 方法二: 使用zip方法 dict_ori = {'A':1, 'B':2, 阅读全文
posted @ 2019-01-16 16:07 simple_wxl 阅读(4345) 评论(0) 推荐(0) 编辑
摘要: test = np.array([[1, 2, 3], [2, 3, 4], [5, 4, 3], [8, 7, 2]])np.argmax(test, 0) #输出:array([3, 3, 1]np.argmax(test, 1) #输出:array([2, 2, 0, 0] 阅读全文
posted @ 2019-01-16 14:58 simple_wxl 阅读(163) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 21 下一页