会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
simple_wxl
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
···
21
下一页
2019年1月24日
tensorflow variable的保存和修改(加载一部分variable到新的model中)
摘要: 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
阅读(1392)
评论(0)
推荐(0)
2019年1月23日
crontab挂定时任务
摘要: Linux shell基本知识 a)">" 与 ">>" 的作用是不一样的,前者使用本次输出内容替换原有文件的内容,后者则是把本次输出追加到原文件的后面。 b) 0、1、2 是系统保留的三个文件描述符,分别对应标准输入、标准输出、标准错误 c) 重定位运算符 ">" ">>" 的默认参数为标准输出
阅读全文
posted @ 2019-01-23 16:46 simple_wxl
阅读(297)
评论(0)
推荐(0)
2019年1月22日
sparse_softmax_cross_entropy_with_logits
摘要: >>> 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
阅读(184)
评论(0)
推荐(0)
2019年1月20日
list 复制
摘要: 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
阅读(193)
评论(0)
推荐(0)
2019年1月19日
tf.reduce_sum函数
摘要: >>> 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
阅读(854)
评论(0)
推荐(0)
2019年1月18日
tf.reduce_mean
摘要: 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
阅读(162)
评论(0)
推荐(0)
tf.metrics.accuracy ==>坑货
摘要: tf.metrics.accuracy输出两个值,第一个值为上几步的平均精度,第二值是上几步与该步的精度的平均值. 正常的计算单个batch正确率的代码 self.correct_prediction = tf.equal(self.labels,self.labels_pred ) self.ac
阅读全文
posted @ 2019-01-18 10:38 simple_wxl
阅读(1760)
评论(0)
推荐(0)
2019年1月17日
tf.summary.merge_all()
摘要: 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
阅读(9255)
评论(0)
推荐(0)
2019年1月16日
python dict交换key value值
摘要: 方法一: 使用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
阅读(4384)
评论(0)
推荐(0)
tf.argmax()
摘要: 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
阅读(172)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
···
21
下一页
公告