Giter Club home page Giter Club logo

deeplearning.ai_jupyternotebooks's Introduction

deeplearning.ai_JupyterNotebooks

更多干货欢迎关注

第五章的代码作业可能不会做了,希望fork的同学们能够pull一下。

该仓库主要存放Coursera上DeepLearning.ai课程的Jupyter Notebook的练习题。 放在gituhb上希望能和大家一起学习~

1.DeepLearning课程笔记传送门:

第一章 神经网络与深度学习(Neural Network & Deeplearning)

第二章 改善深层神经网络

第三章 结构化机器学习项目

第四章 卷积神经网络

第五章 序列模型

2.吴恩达机器学习

机器学习系列笔记

3.博客地址

4.数据下载

因为github对文件大小有要求,所以很多数据集无法上传,需要的可转至百度网盘下载:

链接:https://pan.baidu.com/s/13fqneLonj7u1F8DRvDjsBg 密码:w5f0

5.其他

如果大家有什么比较好的学习资料或者视频也可以在issue贴出来,我会选出一些合适的整合在这里,谢谢!

近期在准备托福考试,所以后续作业可能会推迟上传。


2018.03.04  更新

6.无耻的广告

哈哈哈,托福只准备了2个月左右一次过了,所以打个广告,又想考托福的可以邮箱( [email protected] )私戳我购买 口语、写作资料,真的是神器!当然也欢迎单纯想问一些考试细节的同学

deeplearning.ai_jupyternotebooks's People

Contributors

marsggbo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deeplearning.ai_jupyternotebooks's Issues

第二章week1梯度检验编程作业有误

第二章week1第三个编程作业-梯度检验,最后一个代码块中的
numerator = np.linalg.norm(gradapprox - grad)
应该改为
numerator = np.linalg.norm(grad- gradapprox)
这样最后的结果会和样例输出相同。

Convolution model - Application 前向传播算的结果和答案不一致

自查了好几遍代码没发现问题出在哪里,从前向传播开始计算结果与答案不一致,我错误的结果是
Z3 = [[ 1.4416984 -0.24909666 5.450499 -0.2618962 -0.20669907 1.3654671 ]
[ 1.4070846 -0.02573211 5.08928 -0.48669922 -0.40940708 1.2624859 ]]
cost = 4.6648693
导致后面算cost也是偏大。
求助,讨论一下

反向传播(选做), 最后算出来答案对不上,其实也没太搞明白卷积网络的反向传播,知道的麻烦解释一下,谢谢!

The assign of the first week of Lesson 4 5.2.3 Putting it together: Pooling backward
Change Part:

                        # Set dA_prev to be dA_prev + (the mask multiplied by the correct entry of dA) (≈1 line)
                        dA_prev[i, vert_start: vert_end, horiz_start: horiz_end, c] += np.multiply(mask, dA[i, h, w, c])
                        # Get the value a from dA (≈1 line)
                        da = dA[i, h, w, c]
                        # Distribute it to get the correct slice of dA_prev. i.e. Add the distributed value of da. (≈1 line)
                        dA_prev[i, vert_start: vert_end, horiz_start: horiz_end, c] += distribute_value(da, shape)

The Reason:
Pooling Layer 前向传播是一个slice对应一个scalar,所以在反向传播的时候应该是一个scalar对应一个slice。multiply mask and the scalar 再与对应slice相加能够刚好把error传递给最大值;distribute_value与对应slice相加,能够将error 平均分给slice中的每个值,最终实现精准传播误差的目的。
不知道自己有没有描述清楚,@marsggbo谢谢分享作业!!!

我在运行的时候一直遇到问题

你好,我在运行的时候一直遇到这样的问题
比如第二课,第一周的Regularization
train_X, train_Y, test_X, test_Y = load_2D_dataset()
哎困扰我很久了,一直没有找到原因

TypeError Traceback (most recent call last)
c:\users\administrator\appdata\local\programs\python\python36-32\lib\site-packages\matplotlib\colors.py in to_rgba(c, alpha)
131 try:
--> 132 rgba = _colors_full_map.cache[c, alpha]
133 except (KeyError, TypeError): # Not in cache, or unhashable.

TypeError: unhashable type: 'numpy.ndarray'

During handling of the above exception, another exception occurred:

ValueError Traceback (most recent call last)
c:\users\administrator\appdata\local\programs\python\python36-32\lib\site-packages\matplotlib\axes_axes.py in scatter(self, x, y, s, c, marker, cmap, norm, vmin, vmax, alpha, linewidths, verts, edgecolors, **kwargs)
3985 # must be acceptable as PathCollection facecolors
-> 3986 colors = mcolors.to_rgba_array(c)
3987 except ValueError:

c:\users\administrator\appdata\local\programs\python\python36-32\lib\site-packages\matplotlib\colors.py in to_rgba_array(c, alpha)
232 for i, cc in enumerate(c):
--> 233 result[i] = to_rgba(cc, alpha)
234 return result

c:\users\administrator\appdata\local\programs\python\python36-32\lib\site-packages\matplotlib\colors.py in to_rgba(c, alpha)
133 except (KeyError, TypeError): # Not in cache, or unhashable.
--> 134 rgba = _to_rgba_no_colorcycle(c, alpha)
135 try:

c:\users\administrator\appdata\local\programs\python\python36-32\lib\site-packages\matplotlib\colors.py in _to_rgba_no_colorcycle(c, alpha)
188 if len(c) not in [3, 4]:
--> 189 raise ValueError("RGBA sequence should have length 3 or 4")
190 if len(c) == 3 and alpha is None:

ValueError: RGBA sequence should have length 3 or 4

During handling of the above exception, another exception occurred:

ValueError Traceback (most recent call last)
in ()
----> 1 train_X, train_Y, test_X, test_Y = load_2D_dataset()

~\Desktop\deeplearning.ai_JupyterNotebooks-master\deeplearning.ai_JupyterNotebooks-master\2_Improving Deep Neural Networks Hyperparameter tuning, Regularization and Optimization\week1\2_Regularization\reg_utils.py in load_2D_dataset()
332 test_Y = data['yval'].T
333
--> 334 plt.scatter(train_X[0, :], train_X[1, :], c=train_Y, s=40, cmap=plt.cm.Spectral);
335
336 return train_X, train_Y, test_X, test_Y

c:\users\administrator\appdata\local\programs\python\python36-32\lib\site-packages\matplotlib\pyplot.py in scatter(x, y, s, c, marker, cmap, norm, vmin, vmax, alpha, linewidths, verts, edgecolors, hold, data, **kwargs)
3376 vmin=vmin, vmax=vmax, alpha=alpha,
3377 linewidths=linewidths, verts=verts,
-> 3378 edgecolors=edgecolors, data=data, **kwargs)
3379 finally:
3380 ax._hold = washold

c:\users\administrator\appdata\local\programs\python\python36-32\lib\site-packages\matplotlib_init_.py in inner(ax, *args, **kwargs)
1715 warnings.warn(msg % (label_namer, func.name),
1716 RuntimeWarning, stacklevel=2)
-> 1717 return func(ax, *args, **kwargs)
1718 pre_doc = inner.doc
1719 if pre_doc is None:

c:\users\administrator\appdata\local\programs\python\python36-32\lib\site-packages\matplotlib\axes_axes.py in scatter(self, x, y, s, c, marker, cmap, norm, vmin, vmax, alpha, linewidths, verts, edgecolors, **kwargs)
3989 msg = ("c of shape {0} not acceptable as a color sequence "
3990 "for x with size {1}, y with size {2}")
-> 3991 raise ValueError(msg.format(c.shape, x.size, y.size))
3992 else:
3993 colors = None # use cmap, norm after collection is created

ValueError: c of shape (1, 211) not acceptable as a color sequence for x with size 211, y with size 211

第四章, Convolution model - Step by Step 最后pool layer back propagation

应该改成

                   if mode == "max":
                        
                        # Use the corners and "c" to define the current slice from a_prev (≈1 line)
                        a_prev_slice = a_prev[vert_start:vert_end, horiz_start:horiz_end, c]
                        # Create the mask from a_prev_slice (≈1 line)
                        mask = create_mask_from_window(a_prev_slice)
                        # Set dA_prev to be dA_prev + (the mask multiplied by the correct entry of dA) (≈1 line)
                        dA_prev[i, vert_start: vert_end, horiz_start: horiz_end, c] += np.multiply(mask, dA[i, h, w, c])
                        
                    elif mode == "average":
                        
                        # Get the value a from dA (≈1 line)
                        da = dA[i, h, w, c]
                        # Define the shape of the filter as fxf (≈1 line)
                        shape = (f, f)
                        # Distribute it to get the correct slice of dA_prev. i.e. Add the distributed value of da. (≈1 line)
                        dA_prev[i, vert_start: vert_end, horiz_start: horiz_end, c] += distribute_value(da, shape)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.