hankcs / cs224n Goto Github PK
View Code? Open in Web Editor NEWCS224n: Natural Language Processing with Deep Learning Assignments Winter, 2017
Home Page: http://www.hankcs.com/tag/cs224n/
License: GNU General Public License v3.0
CS224n: Natural Language Processing with Deep Learning Assignments Winter, 2017
Home Page: http://www.hankcs.com/tag/cs224n/
License: GNU General Public License v3.0
在q2_rnn.py 中的Config里面
n_word_features = 2 # Number of features for every word in the input.
这个feature是什么feature?每个word用两个feature来表示是什么意思。。。想了好久都没有想通。。。
在后面做embedding的时候发现这个feature也不是word——embedding的length。。
Returns:
embeddings: tf.Tensor of shape (None, max_length, n_features*embed_size)
谢谢大神。。
can someone explain what are the inputVectors and outputVectors? why the vectors be split to two parts? thank you
大佬您好,我参考了您得assignment1中得word2vec.py得实现。但是在运行过程中梯度检测报错了。
==== Gradient check for skip-gram ====
Gradient check failed.
First gradient error found at index (0, 0)
Your gradient: -0.087147 Numerical gradient: 1254.567123
我是用py3实现的,之前的所有代码几乎一致,也都正确通过了,唯独这里通过不了。之后我将您的代码直接全部拷贝下来运行,同样报以上错误,请问您知道怎么回事嘛,您当时运行通过了吗?
哪里可以找到没有答案的作业
想问下,代码全部都是正确无误的么?
outputs, state = tf.nn.dynamic_rnn(cell, x, dtype=tf.float32)
output = outputs[:, -1]
preds = tf.sigmoid(output)
虽然gru中两者是等同的
博主,您好.我现在在做assignment1.我想用python3做完.然后就出现了一些编码问题...
主要就是下载的文本中,datasetSentences.txt 和dictionary.txt 这两个文本中的句子没办法match.
然后我发现datasetSentences.txt中的文本显示有少量乱码,因此我估计该文本编码方式有问题.然后在作业给的程序中我发现,读dictionary.txt文本时直接用read()方法即可(treebank.py中120行往下).但是在读datasetSentences.txt时的操作却让人很费解: read().decode("utf8").encode("latin1").程序中解释是"Deal with some peculiar encoding issues with this file"(treebank.py中54行往下),但没具体说为什么..博主能不能帮忙理一下,这个操作的逻辑是什么?
然后,在python3中我应该怎样正确读取datasetSentences.txt呢?因为python3中read()是不能接decode操作的,我试了下read().encode("latin1")和直接read()都不成功...
非常感谢啦!
Hi,hankcs.我在做作业1的时候参考学习你的代码,其中关于softmax的矩阵运算(q1_softmax.py中35行)。
请问此处denom=lambda x:1.0/np.sum(x)
是不是归一化分母,如果按照归一化分母的写法,是不是应该是denom=lambda x:1.0/np.sum(exp_minmax)
或者denom=lambda x:1.0/np.sum(np.exp(x))
呢?请指教
The link for the sh file of assignment1 is down. Where can I find the zip file? Can you help. Thx.
In calculating gradients, the gradient of the softmax function is not calculated using the formula that is derived in the lecture notes. It seems like in the code, this step is skipped over, and the gradient of the cost function with respect to yhat is used only ('d3' variable). Am I missing something here?
请问作业一的数学推到 怎么我总是推的和结果对不上呢?
含有一个隐藏层的网络 和word2vec 怎么推?
答案给的结果 怎么感觉有点诡异呢
谢谢啊
顺便问一句,你有微信没 可以直接加好友没?
楼主有遇到吗?test2的1001和1002一用exp函数就溢出了...
貌似资料链接 http://pan.hankcs.com/jump.php?4 失效了,您能再分享下吗,谢谢!
代码里好像没有自动打分的?请问你怎么测试的呢
this error shows in q2_rnn
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.