自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(59)
  • 收藏
  • 关注

原创 【sparrowhawk】笔记

1.sparrowhawk谷歌内部基于WFST的TTS-TN系统Kestrel的开源版本 sparrowhawk,可以支持数字,日期,时间,货币,邮箱等多种文本类型的书面语文本转口语文本安装参考2.sparrowhawk基本工作过程主要包括两个模块The tokenizer/classifierThe verbalizer2.1.tokenizer / classify模块2....

2019-11-07 11:46:06 1323

原创 【VIM配置】

“zq”set nocompatiblesyntax enableset nucolorscheme delekset autoindentset ts=4set shiftwidth=4set hlsearch"colorscheme default " 设置颜色主题"syntax on " 语法高亮"filetype on ...

2019-09-05 16:09:06 184

原创 语音识别基本原理学习

语音识别基本架构W表示文字序列,Y表示语音的输入那么根据公式1,表示语音识别的目标是 在给定语音输入的情况下,找到可能性最大的文字序列根据贝叶斯公式,可以得到公式2,分母P(Y)表示出现这条语音的概率,对于我们的求解目标来说是一个常数,所以求解时忽略,得到公式3公式3的P(Y|W)表示给定一个文字序列而出现这条音频的概率,成为声学模型。P(W)表示出现这个文字序列的概率,成为语言模型。...

2019-08-01 11:56:30 999

原创 【QA学习】综述学习

分类输入是否考虑历史信息单轮对话多轮对话构建方法1.检索式方法首先构建一个用于检索的数据库,将用户的输入视为对该索引系统的查询,从中选择一个回复。具体的来说,当用户在线输入语句后,系统首先初步检索,初步找回一批候选回复,然后再根据对话匹配模型进行重排序得到最佳回复。2.生成式方法而生成式的方法则源自机器翻译,收集大规模的语料,然后再建立一种端到端的模型,来学习输入和回复...

2019-05-15 20:36:18 960

转载 【tranformer】转

原文标题:The Illustrated Transformer原文链接:https://jalammar.github.io/illustrated-transformer/论文地址:https://arxiv.org/abs/1706.03762前言&nbsp...

2019-05-08 11:24:44 453

原创 leetcodes

21. Merge Two Sorted ListsMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Example:Input: 1->2->4,...

2019-05-06 21:27:18 408

原创 value_based RL学习记录

强化学习使用强化学习能够让机器学着如何在环境中拿到高分, 表现出优秀的成绩. 而这些成绩背后却是他所付出的辛苦劳动, 不断的试错, 不断地尝试, 累积经验, 学习经验.根据行为来打分,不会告诉你该怎么做,而是给这个行为打分。下一次决策的时候记住那些可以得到高分的行为,进行这个行为,拿高分避免低分。RL算法们方法不理解环境 model-free根据真实世界的反馈,一步一...

2019-05-06 21:23:56 476

原创 【Leetcode刷题笔记】210. Course Schedule II 有向图能否完全遍历?无环?

class Solution {public: /* 思路:在有向图中能否找到一个无环的路径,遍历所有的节点。 如果有环,则证明无法找到。 贪心思想:首先找到节点中入度为0的节点来进行初始遍历,为什么要入度为0呢? 因为入度为0的情况下,没有其他节点能达到这个节点; 那么如果我们需要遍历所有节点的话,那么我们必须首先从这个节点开始。 ...

2019-04-03 17:00:13 284

原创 【Leetcode刷题笔记】148. Sort List 进行链表的排序,不使用额外的存储空间

使用mergeSort思想来进行链表排序;主要思想:分治法ListNode* sortList(ListNode *head){ //当前为空或者只有一个节点 ListNode *slow = head; ListNode *fast = head; //使用两个指针,一快一慢,来找到当前链表的中段,然后二分到两块进行处理 while(fast&&fast-&gt...

2019-04-03 16:18:47 555

原创 【Leetcode刷题笔记】c++ map的排序方式

按Key排序map默认的排序方式就是按key进行排序按Value排序当需要按Value排序时,装入vector<pari<int,int>>中,再进行vector的排序,需要自写排序函数,然后进行排序。int cmpByValue(const pair<int,int>& p1,const pair<int,int>& p2)...

2019-03-22 08:55:44 320

原创 【Leetcode刷题笔记】204. Count Primes 快速求N以内的素数个数

int countPrimes(int n) { if(n&lt;=2)return 0; int ans = 1; vector&lt;bool&gt;res(n,false); int upper = sqrt(n); for(int i=3;i&lt;n;i=i+2){ if(!res[i]){ ans++; ...

2019-03-03 23:17:18 602

原创 【Leetcode刷题笔记】400. Nth Digit 自然数第n个数字

Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6,7, 8, 9, 10, 11, …Note: n is positive and will fit within the range of a 32-bit signedinteger (n &lt; 231).int findNthDigit(i...

2019-03-03 21:29:09 192

原创 【Leetcode刷题笔记】190. Reverse Bits bit位运算

Example 1:Input: 00000010100101000001111010011100Output: 00111001011110000010100101000000Explanation: The input binary string 00000010100101000001111010011100 represents the unsigned integer 43261...

2019-03-03 20:57:00 227

原创 【算法刷题】二维数组按左到右递增,上到下递增。查找某个值

两种解决方法:1.按照二分查找的思想,由于题目的描述,二维数组按左到右递增,那么就相当于每一行都是有序的,可以把每一行都当做一个独立的数组进行二分查找。bool Find1(int target, vector&lt;vector&lt;int&gt; &gt; array) { for(int i=0;i&lt;array.size();i++){ int l =0...

2019-03-02 17:00:58 1029

原创 【Leetcode刷题笔记】 754. Reach a Number 数学求和问题

参考 https://www.cnblogs.com/ranjiewen/p/9362599.html754. Reach a NumberYou are standing at position 0 on an infinite number line. There is a goal at position target.On each move, you can either go ...

2019-03-02 11:04:49 166

原创 【Leetcode刷题笔记】 160. Intersection of Two Linked Lists

题目思路:求两个链表是否存在交集。交集:在当前节点到最后节点的所有值都相同首先只能想到比较笨的暴力方法:在A和B的所有节点,遍历到最后的节点,判断是否相同。参考了一些博客之后:博客明白了隐含条件,如果两个链表长度不一样时,那么交集点肯定存在在长度差的地方。于是也就有了解决方法1:首先求出两个链表长度,并且将较长的链表进行后移,知道达到长度相同的点。然后开始判断两个链表节点是否相同,...

2019-03-01 13:32:02 140

原创 【Leetcode刷题笔记】984. String Without AAA or BBB 字符串贪心

Given two integers A and B, return any string S such that:S has length A + B and contains exactly A ‘a’ letters, and exactly B ‘b’ letters;The substring ‘aaa’ does not occur in S;The substring ‘bbb...

2019-03-01 11:53:07 149

原创 【Leetcode刷题笔记】687. Longest Univalue Path 寻找单路径二叉树中节点值相同的边的个数

Given a binary tree, find the length of the longest path where each node in the path has the same value. This path may or may not pass through the root.Note: The length of path between two nodes is r...

2019-02-28 22:50:35 121

原创 【Leetcode刷题笔记】680. Valid Palindrome II 回文串II 可以删除一个字符再判断

bool validPalindrome(string s) { if(s.size()&lt;2)return false; int l=0,r=s.size()-1; while(l&lt;r){ if(s[l]==s[r]){ l++; r--; ...

2019-02-28 21:31:05 217

原创 【Leetcode刷题笔记】290. Word Pattern map以及string映射

Given a pattern and a string str, find if str follows the same pattern.Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in str.Example ...

2019-02-28 21:14:22 203

原创 【Leetcode刷题笔记】914. X of a Kind in a Deck of Cards GCD最小公约数

n a deck of cards, each card has an integer written on it.Return true if and only if you can choose X &gt;= 2 such that it is possible to split the entire deck into 1 or more groups of cards, where:...

2019-02-28 20:46:51 120

原创 【Leetcode刷题笔记】219. Contains Duplicate II 判断在k范围之间有无重复数据

Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the absolute difference between i and j is at most k....

2019-02-28 19:23:46 150

原创 【Leetcode刷题笔记】141. Linked List Cycle 在链表中快速判断是否存在环

bool hasCycle(ListNode *head) { if(!head ||!head-&gt;next)return false; ListNode *fast=head,*low = head; while(fast&amp;&amp;fast-&gt;next){ fast = fast-&gt;next-&gt;next; ...

2019-02-28 12:59:38 144

原创 【Leetcode刷题笔记】438. Find All Anagrams in a String 滑动窗口

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 length of both strings s and p will not be larger...

2019-02-28 12:06:40 126

原创 【Leetcode刷题笔记】205. Isomorphic Strings

Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences of a character must be replaced with another ch...

2019-02-26 18:56:53 97

原创 【Leetcode刷题笔记】459. Repeated Substring Pattern KMP算法

Given a non-empty string check if it can be constructed by taking a substring of it and appending multiple copies of the substring together. You may assume the given string consists of lowercase Engli...

2019-02-26 13:07:46 220

原创 【Leetcode刷题笔记】558. Quad Tree Intersection 四叉树求OR

A quadtree is a tree data in which each internal node has exactly four children: topLeft, topRight, bottomLeft and bottomRight. Quad trees are often used to partition a two-dimensional space by recurs...

2019-02-26 11:04:05 167

原创 【Leetcode刷题笔记】110. Balanced Binary Tree 判断一棵树是否是平衡树,即左子树右子树深度差小于等于1

Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as:a binary tree in which the depth of the two subtrees of every node never differ ...

2019-02-25 22:01:08 187

原创 【Leetcode刷题笔记】572. Subtree of Another Tree判断一个树是否是另一个树的子树

Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a tree consists of a node in s and all of this node...

2019-02-23 15:00:35 235

原创 【Leetcode刷题笔记】437. Path Sum III 寻找树的子路径和中等于sum的路径

You are given a binary tree in which each node contains an integer value.Find the number of paths that sum to a given value.The path does not need to start or end at the root or a leaf, but it must ...

2019-02-23 12:37:39 166

原创 【Leetcode刷题】用队列实现栈,用栈实现队列

1.用队列实现栈使用两个队列,进行交替使用。q2作为主要队列,当每一次进栈的时候,先将q2队列中的所有元素先进q1,再将所需要进栈的元素进q2,然后将所有q1元素重新进q2。需要交替使用class MyStack {public: queue&lt;int&gt;q1,q2; /** Initialize your data structure here. */ /...

2019-02-23 12:02:42 153

原创 【Leetcode刷题笔记】101. Symmetric Tree 判断二叉树是否为对称树

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree [1,2,2,3,4,4,3] is symmetric: 1 / \ 2 2 / \ / \3 4 4 3思路:对...

2019-02-23 11:03:47 161

原创 【Leetcode刷题笔记】669. Trim a Binary Search Tree

Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R] (R &gt;= L). You might need to change the root of the tree, so the re...

2019-01-30 15:29:21 114

原创 【paper笔记】Large Scaled Relation Extraction with Reinforcement Learning-AAAI2018

Large Scaled Relation Extraction with Reinforcement Learning概述为了解决远程监督中噪声数据的问题,使用强化学习bag-level的训练对于每个bag,根据bag里的抽取的每个句子的关系来确定bag所表示的关系,然后进行强化学习训练,从而提高性能进行两种不同规模的实验,证明可以提高关系抽取器的性能1.问题1.1 大纲为...

2019-01-15 15:52:46 961

原创 【paper笔记】Robust Distant Supervision Relation Extraction via Deep Reinforcement Learning-P18-1199-ACL

Abstract远程监督定义:定义:只要包含两个Entity的句子,都在描述同一种关系。用途:主要用来为关系分类任务扩充数据集。优点:能够很快速地为数据集打上标签缺点:它假设只要包含两个Entity的句子,都在描述同一种关系,这个假设会产生很多地错误标签。可能这两个Entity这是与某个主题有关。 因此往往还需要用一些过滤的方法去筛选出对关系分类有用的句子,比如sentence-le...

2019-01-15 15:51:40 1699 1

原创 RNN以及变体LSTM,GRU,以及Tensorflow代码

文章目录1.RNN1.1 单个RNN单元每个时间步隐藏层的计算:1.2 多个RNN单元的前向传播1.3 RNN的反向传播(单个RNN单元)1.4 RNN存在的问题1:无法运用未来的信息1.4.1 RNN的改进:双向RNN1.5 RNN存在的问题2:梯度爆炸和梯度消失2 RNN的变体2.1 LSTM (Long Short-Term Memory)长短时记忆网络2.2 BI-LSTM2.3 GR...

2018-12-08 16:26:18 3121

原创 【leetcode刷题日记】121. Best Time to Buy and Sell Stock

Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), ...

2018-10-11 17:29:28 89

原创 【leetcode刷题日记】 01. Binary Watch

问题描述:A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59).Each LED represents a zero or one, with the least significant bi...

2018-10-11 17:09:54 113

原创 【TensorFlow实战】用TensorFlow实现简单的卷积神经网络

#本次将练习实现一个简单的卷积神经网络,使用的数据集依然是MNIST,#预期可以达到99.2%左右的准确性#使用两个卷积层加上一个全连接蹭构建一个简单但是非常具有代表性的卷积神经网络#载入MNIST数据集,并且创建默认的Interactive Sessionfrom tensorflow.examples.tutorials.mnist import input_dataimport t...

2018-10-11 16:11:15 222

原创 【TensorFlow实战】用Python实现自编码器

代码:import numpy as npimport sklearn.preprocessing as prepimport tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_data##均匀分布的Xaiver初始化器def xavier_init(fan_in, fan_out, const...

2018-10-11 15:19:13 1923

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除