- 博客(128)
- 收藏
- 关注
转载 acl 4 year statistics
转载于:https://www.cnblogs.com/ZJUT-jiangnan/p/8630157.html
2018-03-23 14:31:00
192
转载 ijcai statistics
转载于:https://www.cnblogs.com/ZJUT-jiangnan/p/6836855.html
2017-05-10 16:56:00
235
转载 Regular Expression Patterns
Regular Expression PatternsFollowing lists the regular expression syntax that is available in Python.PatternDescription^match beginning of the line.$match end of line..match a...
2017-02-09 11:32:00
230
转载 Theano printing
Theano printingTo visualize the internal relation graph of theano variables.Installingconda install pydot graphvizadd graphviz path D:\Anaconda\Library\bin\graphvizto system PATH[windows ver...
2017-01-02 16:05:00
179
转载 Theano Graph Structure
Graph StructureGraph Definitiontheano's symbolic mathematical computation, which is composed of:Apply node: the application of an operator to some variable.Variable node: symbolic varibles....
2016-12-31 20:01:00
121
转载 Theano Inplace
Theano Inplaceinplace Computationcomputation that destroy their inputs as a side-effect.Exampleif you iterate over matrix and double every elements, this is an inplace operations.because whe...
2016-12-22 14:41:00
122
转载 broadcasting Theano vs. Numpy
broadcasting Theano vs. Numpybroadcast mechanism allows a scalar may be added to a matrix, a vector to a matrix or a scalar to a vecotor.ExamplesT and F stands for True and False respectively...
2016-12-16 11:08:00
111
转载 theano broadcasting
当我们使用函数对两个数组进行计算时,函数会对这两个数组的对应元素进行计算,因此它要求这两个数组有相同的大小(shape相同)。如果两个数组的shape不同的话,会进行如下的广播(broadcasting)处理:让所有输入数组都向其中shape最长的数组看齐,shape中不足的部分都通过在前面加1补齐输出数组的shape是输入数组shape的各个轴上的最大值如果输入数组的某个轴和输...
2016-11-23 15:26:00
102
转载 theano scan optimization
selected from Theano DocOptimizing Scan performanceMinimizing Scan Usageperforman as much of the computation as possible outside of Scan. This may have the effect increasing memory usage but a...
2016-11-14 17:57:00
128
转载 theano sparse_block_dot
theano 中的一个函数 sparse_block_dot;Function:for b in range(batch_size): for j in range(o.shape[1]): for i in range(h.shape[1]): o[b, j, :] += numpy.dot(h[b, i], W[iIdx[b, i]...
2016-11-08 22:03:00
120
转载 theano .dimshuffle
.dimshuffle改变输入维度的顺序,返回原始变量的一个view.输入是一个包含 \([0,1,...,ndim-1]\) 和任意数目的 \('x'\) 的组合:例如:\(('x')\):将标量变成 \(1\) 维数组\((0, 1)\):与原始的 \(2\) 维数组相同\((1, 0)\):交换 \(2\) 维数组的两个维度,形状从 \(N \times M\) 变 ...
2016-11-02 16:59:00
190
转载 Noise Contrastive Estimation
Notes from Notes on Noise Contrastive Estimation and Negative Samplingone sample:\[x_i \to [y_i^0,\cdots,y_{i}^{k}]\]where \(y_i^0\) are true labeled words , and \(y_i^1,\cdots,y_i^{k}\) are n...
2016-10-06 19:59:00
280
转载 vector - vector product
the inner productGivens two vectors \(x,y\in \mathbb{R}^n\), the quantity \(x^\top y\), sometimes called the inner product or dot product of the vectors, is a real number given by:\[x^\top y=\b...
2016-10-02 11:11:00
223
转载 Traditional Language Model
Traditional Language Model通常用于回答下述问题:How likely is a string of English words good English ?\(p_{LM}(\)the house is small\()\ge p_{LM}(\) small the is house\()\)\(p_{LM}(\)I am going home\()\ge...
2016-09-01 14:09:00
112
转载 Derivative of the softmax loss function
Back-propagation in a nerual network with a Softmax classifier, which uses the Softmax function:\[\hat y_i=\frac{\exp(o_i)}{\sum_j \exp(o_j)}\]This is used in a loss function of the form:\[\ma...
2016-08-20 19:51:00
237
转载 Perplexity Vs Cross-entropy
Evaluating a Language Model: PerplexityWe have a serial of \(m\) sentences:\[s_1,s_2,\cdots,s_m\]We could look at the probability under our model \(\prod_{i=1}^m{p(s_i)}\). Or more convenientl...
2016-06-23 20:20:00
527
转载 tensrflow python [defunct]
在ubuntu上面安装了GPU版本的tensorflow后,很容易碰到zombie thread 的问题,无法正常关闭tensorflow的线程,用ps aux|grep python可以看到python [defunct]表明这个python 的程序已经成为了zombie了,如果要杀死该进程,必须要kill 其parent 的进程。然而,不信的是我们发现PPID=1, 这个是系统...
2016-06-04 11:12:00
211
转载 Introduction to Neural Machine Translation - part 2
waiting for updating....转载于:https://www.cnblogs.com/ZJUT-jiangnan/p/5553201.html
2016-06-02 15:24:00
100
转载 Theano: CNMeM is disabled, CuDNN not available
ProblemTheano: CNMeM is disabled, CuDNN not availableSolutioncnmem package: https://github.com/NVIDIA/cnmem% cd $HOME% git clone https://github.com/NVIDIA/cnmem.git cnmem% cd cnmem% mkdir ...
2016-05-26 21:21:00
176
转载 Python * 和 ** 参数问题
Problemdef calcuate(*keys) def calcluate(**keys)Slove*: 用来传递人一个无名字的参数,这些参数会以一个Tuple的形式来访问.**: 用来传递人一个有名字的参数,这些参数用dict来访问.Examplen_steps=20batch_size=10shape=(n_steps,batch_size)init_w=n...
2016-05-25 15:35:00
77
转载 Introduction to Neural Machine Translation - part 1
The Noise Channel Model\(p(e)\): the language Model\(p(f|e)\): the translation modelwhere, \(e\): English language; \(f\): French Language.由法语翻译成英语的概率:\[p(e|f)=\frac{p(e,f)}{p(f)}=\frac{p(e)...
2016-05-22 14:11:00
118
转载 Long Short-Term Memory (LSTM)公式简介
Long short-term memory:make that short-term memory last for a long time.Paper Reference:A Critical Review of Recurrent Neural Networks for Sequence LearningThree Types of GateInput Gate:Co...
2016-05-18 21:19:00
183
转载 Logistic Regression - Formula Deduction
Sigmoid Function\[ \sigma(z)=\frac{1}{1+e^{(-z)}} \]feature:axial symmetry:\[ \sigma(z)+ \sigma(-z)=1 \]gradient:\[ \frac{\partial\sigma(z)}{\partial z} = \sigma(z)[1-\sigma(z)] \]由性质1 可知...
2016-05-13 14:38:00
98
转载 Some Simple Models of Neurons
Linear neuron:\[y=b+\sum\limits_i{x_i w_i}\]Binary threshold neuron:\[z = \sum\limits_i{x_i w_i}\]\[y=\left\{\begin{aligned} 1,~~~~~~~z\gt \theta \\ 0,otherwise\end{aligned}\right.\]也可以写...
2016-05-13 13:29:00
110
转载 Negative log-likelihood function
Softmax functionSoftmax 函数 \(y=[y_1,\cdots,y_m]\) 定义如下:\[y_i=\frac{exp(z_i)}{\sum\limits_{j=1}^m{exp(z_j)}}, i=1,2,\cdots,m\]它具有很好的求导性质:\[\frac{\partial y_i}{\partial z_i}=y_i* (1-y_i)\]其中,\...
2016-05-13 13:12:00
386
转载 CBOW Model Formula Deduction
Paper Reference: word2vec Parameter Learning Explained 1. One-word context Model In our setting, the vocabulary size is $V$, and the hidden layer size is $N$. The input $x$ is a one-hot repre...
2016-05-09 19:54:00
161
转载 RBM Formula Deduction
Energy based Modelthe probability distribution (softmax function):\[p(x)=\frac{\exp(-E(x))}{\sum\limits_x{\exp(-E(x))}}\]when there are hidden units,\[P(x)=\sum\limits_h{P(x,h)}=\frac{1}{...
2016-05-06 18:54:00
89
转载 various Sequence to Sequence Model
1. A basic LSTM encoder-decoder. Encoder: X 是 input sentence. C 是encoder 产生的最后一次的hidden state, 记作 Context Vector. \[C=LSTM(X).\] Decoder: 每次的输出值就是下一次的输入值, 第一次的输入值就是 encoder 产生的 Context Vector....
2016-04-20 22:17:00
70
转载 Gated Recurrent Unit (GRU)公式简介
update gate $z_t$:defines how much of the previous memory to keep around. \[z_t = \sigma ( W^z x_t+ U^zh_{t-1} )\]reset gate $r_t$: determines how to combine the new input with the p...
2016-04-14 21:46:00
347
转载 RNN 入门教程 Part 4 – 实现 RNN-LSTM 和 GRU 模型
转载 - Recurrent Neural Network Tutorial, Part 4 – Implementing a GRU/LSTM RNN with Python and Theano The code for this post is on Github. This is part 4, the last part of the Recurrent Neural Netw...
2016-03-02 15:49:00
372
转载 RNN 入门教程 Part 3 – 介绍 BPTT 算法和梯度消失问题
转载 - Recurrent Neural Networks Tutorial, Part 3 – Backpropagation Through Time and Vanishing Gradients本文是 RNN入门教程 的第三部分.In the previous part of the tutorial we implemented a RNN from scratch,...
2016-03-02 12:41:00
205
转载 RNN 入门教程 Part 2 – 使用 numpy 和 theano 分别实现RNN模型
转载 - Recurrent Neural Networks Tutorial, Part 2 – Implementing a RNN with Python, Numpy and Theano本文是RNN教程的第二部分,第一部分教程在这里. 对应的样板代码在 Github上面。在这部分内容中,我将会使用 numpy 和 theano 从头开始实现RNN 模型。 实验...
2016-03-02 10:22:00
297
转载 RNN 入门教程 Part 1 – RNN 简介
转载 - Recurrent Neural Networks Tutorial, Part 1 – Introduction to RNNsRecurrent Neural Networks (RNN) 是当前比较流行的模型,在自然语言处理中有很重要的应用。但是现在对RNN的详细结构模型以及如何实现RNN算法的博客很少,故本文目的是翻译该外文资料,帮助理解大家理解。同时,英文文章写的...
2016-02-27 15:10:00
232
转载 Possion 分布
泊松分布的概率函数为:\[P(X=k)=\frac{\lambda^k}{k!}e^{-\lambda},k=0,1,2,\cdots\]如果 $X_i \sim P(\lambda_i)$,并且 互相独立,那么:\[Y=\left( \sum\limits_{i=1}^n{X_i} \right) \sim P \left( \sum\limits_{i=1}^n{\la...
2015-11-09 16:55:00
993
转载 Python – locals和globals
转载: Python两个内置函数——locals 和globals (学习笔记) Python两个内置函数locals 和globals, 这两个函数主要提供,基于字典的访问局部和全局变量的方式。在理解这两个函数时,首先来理解一下python中的名字空间概念。 Python使用叫做名字空间的东西来记录变量的轨迹。名字空间只是一个字典,它的键字就是变量名,字典的值就是那些变量的值。实际上,...
2015-10-20 15:37:00
143
转载 Thenao tutorial – indexing
Theano和numpy一样,支持基本的下标取值方法和高级的下标取值方法。因为theano中没有boolean类型,所以不支持boolean类型的masks。# head file supportimport numpy as npnumpy中的 Advanced Indexing:高级下标取值用于获取非元组序列对象中的元素时,一般为 bdarray结构。通常可以...
2015-10-16 13:58:00
71
转载 Theano tutorial – basic type
博客摘自:Deep learning 第二篇 婴儿学步 Theano如何做算数?import theano.tensor as Tfrom theano import functionx=T.dscalar('x')y=T.dscalar('y')z=x+y f=function([x,y],z)print f(2,3)输出:5.0两个矩阵相加...
2015-10-13 15:47:00
92
转载 Jacobian矩阵和Hessian矩阵
1.Jacobian矩阵 在矩阵论中,Jacobian矩阵是一阶偏导矩阵,其行列式称为Jacobian行列式。假设 函数 $f:R^n \to R^m$, 输入是向量 $x \in R^n$ ,输出为向量 $f(x) \in R^m$ ,那么对应的Jacobian矩阵 $J$ 是一个 $m*n$ 的矩阵,其定义如下: \[\mathbf J = \frac{d\mathbf f}{d\m...
2015-10-12 21:56:00
123
转载 Python Lambda表达式
Lambda函数也叫匿名函数,即,函数没有具体的名称。先看一个例子:def f(x): return x**2 print f(4)Python中使用lambda的话,写成这样:g = lambda x : x**2print g(4)涵义Lambda语句中,冒号前是参数,可以有多个,用逗号隔开,冒号右边的是返回值。lambda语句构建的是一个函数对象,举...
2015-10-12 21:15:00
99
转载 ubuntu 设置hostname
永久修改hostname:# sudo vim /etc/hostname# sudo vim /etc/hosts 转载于:https://www.cnblogs.com/ZJUT-jiangnan/p/4859371.html
2015-10-07 20:35:00
95
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人