上一页 1 2 3 4 5 6 7 8 9 10 ··· 106 下一页
摘要: 1 def pk(ref, hyp, k=None, boundary='1'): 2 """ 3 Compute the Pk metric for a pair of segmentations A segmentation 4 is any sequence over a vocabulary 阅读全文
posted @ 2017-10-03 21:20 狂徒归来 阅读(646) 评论(0) 推荐(0) 编辑
摘要: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh 阅读全文
posted @ 2017-09-04 10:44 狂徒归来 阅读(201) 评论(0) 推荐(0) 编辑
摘要: Given a string s and a non empty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and the 阅读全文
posted @ 2017-09-03 09:38 狂徒归来 阅读(183) 评论(0) 推荐(0) 编辑
摘要: Given two strings s and t, write a function to determine if t is an anagram of s. For example, s = "anagram", t = "nagaram", return true. s = "rat", t 阅读全文
posted @ 2017-09-03 00:00 狂徒归来 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Tensorflow 自适应学习速率 在模型的初期的时候,往往设置为较大的学习速率比较好,因为距离极值点比较远,较大的学习速率可以快速靠近极值点;而,后期,由于已经靠近极值点,模型快收敛了,此时,采用较小的学习速率较好,较大的学习速率,容易导致在真实极值点附近来回波动,就是无法抵达极值点。 在ten 阅读全文
posted @ 2017-07-02 13:02 狂徒归来 阅读(9593) 评论(0) 推荐(2) 编辑
摘要: Linux 命令学习记录 1. 取指定文件夹下的任意一个文件,并用vim打开 2. 统计给定文件夹下文件的数量 ​ 阅读全文
posted @ 2017-06-13 17:56 狂徒归来 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Tensorflow 笔记 tensorboard 的使用 TensorFlow提供非常方便的可视化命令Tensorboard,先上代码 首先是定义一张图,然后跑图。 这里需要注意一点是,FileWriter一定要在sess.run执行前先执行,也就是说,你得把 写在 之前。参数 表示的是你的 目录 阅读全文
posted @ 2017-06-07 14:24 狂徒归来 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 爬淘宝的商品信息下 (下) 实现定时任务爬取 "上回我们讲到用scrapy爬取淘宝的商品信息" , 今天的任务是实现爬虫的周期作业功能。商品信息的交易量评论数,等等,会处在变动之中,因此需要爬虫能够在每天预设的时间爬取网页。 假设,我们现在的任务是,要爬虫在凌晨3点,也就是 每天的凌晨3:00,(对 阅读全文
posted @ 2017-05-11 14:28 狂徒归来 阅读(711) 评论(1) 推荐(0) 编辑
摘要: BackPropagation BackPropagation中文翻译是后向传播算法,其实更形象的翻译是 误差逆向传播 。其实没什么,不就是利用了 链式法则 。 链式法则(英文chain rule)是 "微积分" 中的 "求导" 法则,用于求一个复合函数的导数,是在微积分的求导运算中一种常用的方法。 阅读全文
posted @ 2017-04-28 23:13 狂徒归来 阅读(672) 评论(0) 推荐(0) 编辑
摘要: 交叉熵损失函数 熵的本质是香浓信息量$\log(\frac{1}{p})$的期望 既然 熵的本质是香浓信息量$\log(\frac{1}{p})$的期望 ,那么便有 $$ H(p)=E[p_i\times\log(\frac{1}{p_i})]=\sum p_i\times\log\frac{1}{ 阅读全文
posted @ 2017-04-28 15:39 狂徒归来 阅读(7032) 评论(1) 推荐(1) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 106 下一页