自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

呜呜哈的博客

读读论文写写代码

  • 博客(27)
  • 资源 (1)
  • 收藏
  • 关注

原创 CNN与句子分类之动态池化方法DCNN--TensorFlow实现篇

本文是paper“A Convolutional Neural Network for Modelling Sentences”基于TensorFlow的实现方法,代码和数据集都可以到我的github上面进行下载。数据集及处理方法本文仿真的是论文的第二个实验,使用的数据集是TREC。该数据集是QA领域用于分类问题类型的。其中问题主要分为6大类别,比如地理位置、人、数学信息等等,这里使用one-hot

2017-03-29 16:34:29 8394 10

原创 leetcode题解-37. Sudoku Solver

题目:Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by the character ‘.’. You may assume that there will be only one unique solution.好几天没刷题了,主要是因为最近在忙着看深

2017-03-28 22:15:53 1746 1

原创 CNN与句子分类之动态池化方法DCNN--模型介绍篇

本文是针对“A Convolutional Neural Network for Modelling Sentences”论文的阅读笔记和代码实现。这片论文的主要贡献在于其提出了一种动态pooling的方法。传统卷积神经网络中所用到的pooling方法一般是max-pooling,且pooling的size是固定不变的。本文通过k-max-pooling的方法可以在高层获取句子中位置较远的词语之间的

2017-03-28 17:44:35 11730

原创 CNN用于句子分类时的超参数分析

本文是“A Sensitivity Analysis of (and Practitioners’ Guide to) Convolutional Neural Networks for Sentence Classification”这篇paper的阅读笔记。这篇paper的主要工作是对“Convolutional Naural Networks for Sentence Classificati

2017-03-27 22:29:48 4152

原创 TensorFlow调试之一种很笨但行之有效的调试方案

说道tensorflow调试,想必大家都是深受其扰,特别是对于新手而言。主要是因为其分为模型搭建和图运行两个阶段,而我们在使用一般的IDE进行调试时只能调试前半部分,即模型搭建环节。在这一环节中,往往我们所能看到的信息是有限的,比如只能看到Tensor的shape却看不到其具体值等等,但是这样的话我们就不知道模型搭建的是否完全正确(譬如仅shape对应的话,很多时候并不能表征模型正确无误)。 所以

2017-03-24 15:37:11 12691 7

原创 CNN在句子相似性建模的应用续--基于attention的多角度CNN模型

今天我们来介绍一下“UMD-TTIC-UW at SemEval-2016 Task 1: Attention-Based Multi-Perspective Convolutional Neural Networks for Textual Similarity Measurement”这篇论文。其实本篇论文和之前所说的Multi-Perspective CNN原理是一样的。只不过做了一些小

2017-03-24 14:17:43 8831 8

原创 leetcode题解-454. 4Sum II

题目:Given four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such that A[i] + B[j] + C[k] + D[l] is zero. To make problem a bit easier, all A, B, C, D have same leng

2017-03-23 19:53:59 582

原创 leetcode题解-18. 4Sum

题目:Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target. Note: The solution s

2017-03-22 09:58:08 471

原创 CNN在句子相似性建模的应用--tensorflow实现篇2

上节已经介绍了数据预处理部分代码,本节则详细介绍一下模型构建和训练部分。旨在以一个新手的角度出发,详细介绍一下tf中不同类型cnn的使用方法以及其中tensor的shape变化,来感受一下其运行过程的细节。代码可以在我的github上下载模型初始化首先我们介绍一下模型构建部分。这部分代码全部写在model.py文件中。为了方便调用,我们写了一个MPCNN_Layer类来实现整个论文模型的构建。首先是

2017-03-21 15:55:55 7984 12

原创 CNN在句子相似性建模的应用--tensorflow实现篇1

经过上周不懈的努力,终于把“Multi-Perspective Sentence Similarity Modeling with Convolution Neural Networks”这篇论文用tensorflow大致实现出来了,代码后续回放到我的github上面。踩了很多坑,其实现在也还有一些小的问题没有搞明白和解决,但是也算自己实现了第一个完整的Tensorflow程序,至于剩下的一些小问题

2017-03-20 21:38:17 6866 9

原创 leetcode题解-381. Insert Delete GetRandom O(1) - Duplicates allowed

题目:Design a data structure that supports all following operations in average O(1) time. Note: Duplicate elements are allowed. 1,insert(val): Inserts an item val to the collection. 2,remove(val): Rem

2017-03-17 14:36:14 781

原创 leetcode题解-76. Minimum Window Substring

题目:Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example, S = “ADOBECODEBANC” T = “ABC” Minimum window is “BANC”. Note

2017-03-16 18:49:38 866

原创 CNN在句子相似性建模的应用--模型介绍篇

最近在读“Multi-Perspective Sentence Similarity Modeling with Convolution Neural Networks”这篇论文,该文通过CNN层对两个句子分别进行建模,然后添加一个句子相似性测量层来计算两个句子的相似度。首先可以看一下其模型的架构图方便有一个直观的理解: 可以看到一个句子首先被转化为嵌入矩阵[sentence_length,

2017-03-16 15:53:51 7325 1

原创 leetcode题解-3. Longest Substring Without Repeating Characters

题目:Given a string, find the length of the longest substring without repeating characters.Examples: Given “abcabcbb”, the answer is “abc”, which the length is 3. Given “bbbbb”, the answer is “b”, with

2017-03-14 17:27:02 1336

原创 leetcode题解-30. Substring with Concatenation of All Words

题目:You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in words exactly once and

2017-03-14 10:55:05 728

原创 leetcode题解-336. Palindrome Pairs

题目:Given a list of unique words, find all pairs of distinct indices (i, j) in the given list, so that the concatenation of the two words, i.e. words[i] + words[j] is a palindrome. Example 1: Given word

2017-03-09 20:18:25 1003

原创 leetcode题解-149. Max Points on a Line

题目:Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 题目是寻找平面中所有点在同一条直线上的最大个数。一种简单的思路就是使用Map来保存每条直线上的点数,然后遍历数组中的每个点即可。代码如下所示:import java.util.HashMap;

2017-03-08 20:08:31 865

转载 使用微信监管你的TF训练

以TensorFlow的example中,利用CNN处理MNIST的程序为例,我们做了下面一点点小小的修改。 1,首先导入了itchat和threading两个包分别用于微信和县线程(因为要有一条线程专门负责接收微信消息,另一个线程运行TF程序); 2,写了个itchat的handler。作用是,如果收到微信消息,解析消息内容,然后执行相应的操作。(开始,停止,参数等) 3,将原本程序在con

2017-03-07 16:16:08 957

原创 leetcode题解-535. Encode and Decode TinyURL

题目:TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problems/design-tinyurl and it returns a short URL such as http://tinyurl.com/4e9iAk. Design the encode and de

2017-03-07 14:46:10 5430

原创 leetcode题解-347. Top K Frequent Elements

题目:Given a non-empty array of integers, return the k most frequent elements. For example, Given [1,1,1,2,2,3] and k = 2, return [1,2]. Note: You may assume k is always valid, 1 ≤ k ≤ number of uniq

2017-03-06 17:25:24 952

原创 leetcode题解-94. Binary Tree Inorder Traversal

题目:Given a binary tree, return the inorder traversal of its nodes’ values. For example: Given binary tree [1,null,2,3], 1 \ 2 / 3 return [1,3,2]. 其实题目就是要中序遍历二叉树的值。题目中也提到了,可以使用递归

2017-03-05 22:07:29 607

原创 leetcode题解-525. Contiguous Array

题目:Given a binary array, find the maximum length of a contiguous subarray with equal number of 0 and 1. Example 1: Input: [0,1] Output: 2 Explanation: [0, 1] is the longest contiguous subarray with

2017-03-04 22:03:59 1419

原创 论文Convolutional Naural Networks for Sentence Classification--TensorFlow实现篇

其实该论文作者已经将文章代码提供了出来,该代码用的是Theano实现的,但是因为最近看了TensorFlow,所以想着用用练练手,所以本文主要参考Denny Britz的一篇博文 来实现CNN和本篇论文,其代码也上传到了github上。说到Denny Britz,大神就是大神,之前也读过他一篇介绍CNN在NLP领域应用场景和方法的文章,写的很透彻也被很多国内网友翻译和转载,他的博客上有很多好的文章,

2017-03-04 20:57:36 9223 11

原创 论文Convolutional Naural Networks for Sentence Classification--模型介绍篇

最近读了Yoon Kim发表的Convolutional Naural Networks for Sentence Classification一文。这是一篇将CNN和NLP结合的文章,接下来我们会分模型介绍和代码实现两部分来介绍该论文。论文所提出的模型结构如下图所示: 1,这里的输入层显示有两个channel,其实我们可以看作是一个,因为后文中说到这两个channel分别是static和no

2017-03-04 15:45:17 6562 11

原创 leetcode题解-355. Design Twitter

题目:Design a simplified version of Twitter where users can post tweets, follow/unfollow another user and is able to see the 10 most recent tweets in the user’s news feed. Your design should support the

2017-03-03 14:12:52 683

原创 leetcode题解-451. Sort Characters By Frequency

题目:Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: “tree” Output: “eert” Explanation: ‘e’ appears twice while ‘r’ and ‘t’ both appear once. So ‘e’

2017-03-02 15:47:01 597

原创 leetcode题解-380. Insert Delete GetRandom O(1)

题目:Design a data structure that supports all following operations in average O(1) time.1,insert(val): Inserts an item val to the set if not already present. 2,remove(val): Removes an item val from the

2017-03-01 10:29:20 576

echarts地图等相关js文件 源码下载

echarts地图等相关js文件 http://blog.csdn.net/liuchonge/article/details/52199100博客中需要的js文件都在这里

2017-10-16

空空如也

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

TA关注的人

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