bighuang624 / andrew-ng-deep-learning-notes Goto Github PK
View Code? Open in Web Editor NEW吴恩达《深度学习》系列课程笔记及代码 | Notes in Chinese for Andrew Ng Deep Learning Course
Home Page: https://kyonhuang.top/Andrew-Ng-Deep-Learning-notes/
吴恩达《深度学习》系列课程笔记及代码 | Notes in Chinese for Andrew Ng Deep Learning Course
Home Page: https://kyonhuang.top/Andrew-Ng-Deep-Learning-notes/
RMSProp 是 Root Mean Square Propagation 的缩写,文中翻译为”均方根支“不对,应该翻译为均方根传播算法。
做预测时模型参数应该是训练得到的参数
predict(w,b,X) 改为
predict(params['w'],params['b'],X)
OSError Traceback (most recent call last)
in ()
1 # Loading the data (cat/non-cat)
----> 2 train_set_x_orig, train_set_y, test_set_x_orig, test_set_y, classes = load_dataset()
~\lr_utils.py in load_dataset()
4
5 def load_dataset():
----> 6 train_dataset = h5py.File('train_catvnoncat.h5', "r")
7 train_set_x_orig = np.array(train_dataset["train_set_x"][:]) # your train set features
8 train_set_y_orig = np.array(train_dataset["train_set_y"][:]) # your train set labels
d:\asoftware\python-3.5.4\benti\lib\site-packages\h5py_hl\files.py in init(self, name, mode, driver, libver, userblock_size, swmr, **kwds)
267 with phil:
268 fapl = make_fapl(driver, libver, **kwds)
--> 269 fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr)
270
271 if swmr_support:
d:\asoftware\python-3.5.4\benti\lib\site-packages\h5py_hl\files.py in make_fid(name, mode, userblock_size, fapl, fcpl, swmr)
97 if swmr and swmr_support:
98 flags |= h5f.ACC_SWMR_READ
---> 99 fid = h5f.open(name, flags, fapl=fapl)
100 elif mode == 'r+':
101 fid = h5f.open(name, h5f.ACC_RDWR, fapl=fapl)
h5py_objects.pyx in h5py._objects.with_phil.wrapper()
h5py_objects.pyx in h5py._objects.with_phil.wrapper()
h5py\h5f.pyx in h5py.h5f.open()
OSError: Unable to open file (unable to open file: name = 'datasets/train_catvnoncat.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
原文链接
Z1 = W1.T * a0 + b1
因为
input layer = 3
hidden layer = 4
output layer = 1
所以,a0的shape是(3,1), 那么W1.T的shape推得即为(4,3),所以W1的shape是(3,4),同理W2的shape也应该反过来才是
补充:看到后面的[神经网络的梯度下降法]中forward propagation中Z1 = W1 * X + b,这里没有转置,建议前后统一,我担心有对向量化不熟的童鞋,这里会晕掉
课程笔记:浅层神经网络:随机初始化:
b = np.zero((2,1)) correct to b = np.zeros((2,1))
thanks a lot for your notes. very helpful.
无论在github中还是html在线阅读,数学公式都无法正常显示,十分影响学习和阅读!不知能够改进?
正则化是在成本函数中加入一个正则化项,惩罚模型的复杂度。正则化可以用于解决低方差的问题。
权重衰减这里:(1−αλ/m)W[l]<1-----是不是应该是(1−αλ/m)W[l]<W[l]
我下载你在github上这个任务里在做第一课的第三次作业的时候遇到一些问题,不知道怎么处理,能帮我看一下么
问题1
以下截图1是运行到前面可视化数据的时候出现的问题
这个问题我再网易课程的论坛中也找到了解决方法,将其中的代码c=Y修改成c=Y[0,]既可以看到那个花型图案,但是我在csdn以及github的网站上看到运行代码这里都不需要修改还是能够运行出花型图案,包括下载到您的代码我看到运行结果在没有修改代码的时候也运行出结果了,所以我想问下这里是我的环境有什么问题么?
问题2
运行这个cell会有下面红色的一行字体,您的运行结果也是有的,但是看到其他一些人的结果并没有这些红色字体,所以这里是为什么呢?不影响我们后续的运行么
问题3
这个运行又是为什么,我在网上搜到所有人都能正常的运行出结果,但是我这里却总是报这个错误,不知道为什么出错???
希望能帮忙看一下,初次介入deeplearning领域,也是刚刚学着使用github,周围没有可以参考的人,冒昧的打扰您,希望能帮忙处理一下
在第二课:改善深层神经网络:超参数调试、正则化以及优化的第二周优化算法里的“理解指数平均加权”的展开式latex公式貌似没写对,直接显示的latex源码。
然后在指数平均加权的偏差修正中的公式的右式也应该除以1-\beta^t,不然老以为得将左式分母,移到右式。
另外,十分感谢您的笔记,对我的学习起了很大的帮助!
所有公式都Math Processing Error
这里我记得应该是训练集和测试集建议来自同一个分部。"What you are targeting on should match your goal."
请问,能否在gitee上部署,或者使用dnspod给域名解析。国内访问好慢。。。。
学习笔记图片
SG的概念定义的比较模糊
SKip-gram:抽取上下文(context)和目标词(target)配对
例:orange(上下文) juice(目标)
WL = np.random.randn(WL.shape[0], WL.shape[1]) * np.sqrt(1/n)
这样,激活函数的输入 x 近似设置成均值为 0,标准方差为 1,
这里np.random.randn是 均值0,方差1的分布,乘上sqrt(1/n),根据方差公式推导,方差=1/n,对应的标准差=sqrt(1/n)
WL = np.random.randn(WL.shape[0], WL.shape[1]) * np.sqrt(1/n)里的np.sqrt(1/n)应该是n[l-1] 即前一层的神经元个数吧
好像也对的 ,如果只是第一层的话,n就是输入层的个数,应该没问题了
哈喽 这个图好像有点问题 输出的参数应该是Wya而不是Way
看起来不错,但是,我想就单单靠通过复习你的笔记来通过深度学习课程的所有选择题测试,是否可靠?
RMSProp 算法 写的和老师讲的有一点出入
dw那组方程变小 db组方程变大
才能实现纵向变小 横向变快
比写同时变大会更好一点吧
图片第二行
for i=1 to m:
What you wrote is
There is a mistake in the backward propagation! difference = 0.17344196893145933
和预期有差别。暂不知道原因
Your codes:
dA2 = np.dot(W3.T, dZ3)
dZ2 = np.multiply(dA2, np.int64(A2 > 0))
dW2 = 1./m * np.dot(dZ2, A1.T) * 2 #It was wrong
db2 = 1./m * np.sum(dZ2, axis=1, keepdims = True)
dA1 = np.dot(W2.T, dZ2)
dZ1 = np.multiply(dA1, np.int64(A1 > 0))
dW1 = 1./m * np.dot(dZ1, X.T)
db1 = 1./m * np.sum(dZ1, axis=1, keepdims = True)
This line dW2 = 1./m * np.dot(dZ2, A1.T) * 2
was wrong.
In this exercise,this piece of code was originally like this(maybe you have chenged some codes,but you did not konw)
dA2 = np.dot(W3.T, dZ3)
dZ2 = np.multiply(dA2, np.int64(A2 > 0))
dW2 = 1./m * np.dot(dZ2, A1.T) * 2 #wrong
db2 = 1./m * np.sum(dZ2, axis=1, keepdims = True)
dA1 = np.dot(W2.T, dZ2)
dZ1 = np.multiply(dA1, np.int64(A1 > 0))
dW1 = 1./m * np.dot(dZ1, X.T)
db1 = 4./m * np.sum(dZ1, axis=1, keepdims = True) #wrong
There were errors in the backward_propagation_n code.
The code should be modified to:
dA2 = np.dot(W3.T, dZ3)
dZ2 = np.multiply(dA2, np.int64(A2 > 0))
dW2 = 1./m * np.dot(dZ2, A1.T)
db2 = 1./m * np.sum(dZ2, axis=1, keepdims = True)
dA1 = np.dot(W2.T, dZ2)
dZ1 = np.multiply(dA1, np.int64(A1 > 0))
dW1 = 1./m * np.dot(dZ1, X.T)
db1 = 1./m * np.sum(dZ1, axis=1, keepdims = True)
Is there any pdf file of this notebook?
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.