05 2018 档案
摘要:解决的问题 自然语言推理,判断a是否可以推理出b。简单讲就是判断2个句子ab是否有相同的含义。 方法 我们的自然语言推理网络由以下部分组成:输入编码(Input Encoding ),局部推理模型(Local Inference Modeling ),和推理合成(inference composit
阅读全文
摘要:http://www.xue63.com/toutiaojy/20180327G0DXP000.html 本文提出一种简单的自然语言推理任务下的神经网络结构,利用注意力机制(Attention Mechanism)将问题分解为可以单独解决的子问题,从而实现了并行化。在斯坦福自然语言推理(SNLI)数
阅读全文
摘要:代码: keras:https://github.com/phdowling/abcnn-keras tf:https://github.com/galsang/ABCNN 本文是Wenpeng Yin 该作者之前还发过一篇《Convolutional Neural Network Architec
阅读全文
摘要:code:https://github.com/chantera/bicnn-mi Yin的这篇论文提出了一种叫Bi-CNN-MI的架构,其中Bi-CNN表示两个使用Siamese框架的CNN模型;MI表示多粒度的交互特征。Bi-CNN-MI包含三个部分: 句子分析模型 (CNN-SM) 这部分模型
阅读全文
摘要:模型结构与原理 1. 基于CNN的句子建模 这篇论文主要针对的是句子匹配(Sentence Matching)的问题,但是基础问题仍然是句子建模。首先,文中提出了一种基于CNN的句子建模网络,如下图: 图中灰色的部分表示对于长度较短的句子,其后面不足的部分填充的全是0值(Zero Padding)。
阅读全文
摘要:Kalchbrenner’s Paper Kal的这篇文章引用次数较高,他提出了一种名为DCNN(Dynamic Convolutional Neural Network)的网络模型,在上一篇(Kim’s Paper)中的实验结果部分也验证了这种模型的有效性。这个模型的精妙之处在于Pooling的方
阅读全文
摘要:文本分类任务中可以利用CNN来提取句子中类似 n-gram 的关键信息。 TextCNN的详细过程原理图见下: keras 代码: 说明如下: 输入层 如图所示,,假设句子有 n 个词,vector的维数为 k ,那么这个矩阵就是 n×k 的。 这个矩阵的类型可以是静态的(static),也可以是动
阅读全文
摘要:初次安装git配置用户名和邮箱 初次安装git需要配置用户名和邮箱, $ git config --global user.name "zle1992" $ git config --global user.email "625015879@qq.com" 注意:(引号内请输入你自己设置的名字,和你
阅读全文
摘要:sudo apt-get install software-name -o Acquire::http::proxy="http://用户名:密码@代理服务器IP:代理服务器端口" 如果不需要用户名和密码使用如下方式: sudo apt-get install software-name -o Ac
阅读全文
摘要:TimeDistributed这个层还是比较难理解的。事实上通过这个层我们可以实现从二维像三维的过渡,甚至通过这个层的包装,我们可以实现图像分类视频分类的转化。 考虑一批32个样本,其中每个样本是一个由16个维度组成的10个向量的序列。该层的批输入形状然后(32, 10, 16)。 可以这么理解,输
阅读全文
摘要:问题 在定义模型的时候,自定义了一个函数 模型保存之后,load 模型的时候报错: 解决 load 模型的时候需要指定custom object 参考: https://faroit.github.io/keras docs/2.1.5/getting started/faq/ handling c
阅读全文
摘要:综述: 本文将 CNN 与 FM(Factorization Machine) 结合,基于评论文本来进行评分预测。 简介: 目前将神经网络应用推荐系统的研究工作中,有一类思路是把如CNN等神经网络作为特征提取器,从图片、文本等辅助信息中提取特征向量, ’再融合到传统的如BPR, PMF等基于矩阵分解
阅读全文
摘要:1. 如何进行迁移 对模型和相应的数据进行.cuda()处理。通过这种方式,我们就可以将内存中的数据复制到GPU的显存中去。从而可以通过GPU来进行运算了。 1.1 判定使用GPU 下载了对应的GPU版本的Pytorch之后,要确保GPU是可以进行使用的,通过torch.cuda.is_availa
阅读全文
摘要:在运行上面的blog的Tensorflow小程序的时候程序我们会遇到一个问题,当然这个问题不影响我们实际的结果计算,但是会给同样使用这台计算机的人带来麻烦,程序会自动调用所有能调用到的资源,并且全占满,在自己的PC上没问题,但是在服务器上,问题就很大,因为一旦你运行程序,占满显存别人就不能再用了,解
阅读全文
摘要:摘要:搭建Python3 jupyter notebook。 激活Python3后,进入Python交互环境 1. 登陆远程服务器 2. 生成配置文件 1. $jupyter notebook --generate-config 3. 生成密码 打开ipython,创建一个密文的密码: 1. In
阅读全文
摘要:摘要: 传统的评分预测只考虑到了文本信息,没有考虑到用户的信息,因为同一个词 在不同的用户表达中是不一样的。同样good 一词, 有人觉得5分是good 有人觉得4分是good。但是传统的文本向量表达无法区分。所以每个人都应该有一个属于自己的词向量。 传统的是word embedding的方式,这样
阅读全文
摘要:一面: 了解了下实习经历,没有展开细节,面试官好像不怎么感兴趣? 然后好像没有问机器学习的东西。 写了个算法题: 2个有序数组中找相同的元素。 ps:上次面百度大搜,也是写算法题,自己闷头写,写到最后还错了,吸取了上次的教训,这次边写边给面试官解释。最后有点小错误,面试官也给指出来了 最后ac。边解
阅读全文
摘要:题目描述 输入一个链表,输出该链表中倒数第k个结点。 快指针先走K步,然后快慢同时走,快走到末尾时,慢指针就是倒数第个。 1 public class Solution { 2 public ListNode FindKthToTail(ListNode head,int k) { 3 if(hea
阅读全文
摘要:题目描述 编写代码,以给定值x为基准将链表分割成两部分,所有小于x的结点排在大于或等于x的结点之前 给定一个链表的头指针 ListNode* pHead,请返回重新排列后的链表的头指针。注意:分割以后保持原来的数据顺序不变。 设置两个链表头,遍历原链表,一个追加小数链表,一个追加大数链表,最后将小数
阅读全文
摘要:反转链表: [LeetCode]206. Reverse Linked List(链表反转) 25. Reverse Nodes in k-Group(K 个一组,反转链表) 92. Reverse Linked List II(链表部分反转) 链表求和: 2. Add Two Numbers(2个
阅读全文
摘要:anacoda 默认的gcc是4.7需要更新 https://anaconda.org/nlesc/gcc 更新之后再安装即可。 报错: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found https://blog.csdn.n
阅读全文
摘要:Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim
阅读全文
摘要:合并区间 : 56. Merge Intervals(56. 合并区间 排序+双指针) 快慢指针: 141. Linked List Cycle(快慢指针 判断链表是否有环) 142. Linked List Cycle II(快慢指针--找出链表相交的节点) 876. 链表的中间结点 19. Re
阅读全文
摘要:Given a sorted array nums, remove the duplicates in-place such that duplicates appeared at most twice and return the new length. Do not allocate extra
阅读全文
摘要:Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another ar
阅读全文
摘要: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). Example: Input: S = "ADOB
阅读全文
摘要:Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't
阅读全文
摘要:The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a
阅读全文
摘要:https://labuladong.gitbook.io/algo/mu-lu-ye/er-fen-cha-zhao-xiang-jie 1 int binary_search(int[] nums, int target) { 2 int left = 0, right = nums.lengt
阅读全文
摘要:Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted f
阅读全文
摘要:Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,0,1,2,2,5,6] might become [2,5,6,0,0,1,2]). Y
阅读全文
摘要:Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). Y
阅读全文
摘要:Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime com
阅读全文
摘要:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or
阅读全文
摘要:Implement int sqrt(int x). Compute and return the square root of x, where x is guaranteed to be a non-negative integer. Since the return type is an in
阅读全文

浙公网安备 33010602011771号