资源简介
吴恩达深度学习deeplearning第五课第一周课后测验及编程作业(含答案)
代码片段和文件信息
import numpy as np
def softmax(x):
e_x = np.exp(x - np.max(x))
return e_x / e_x.sum(axis=0)
def sigmoid(x):
return 1 / (1 + np.exp(-x))
def initialize_adam(parameters) :
“““
Initializes v and s as two python dictionaries with:
- keys: “dW1“ “db1“ ... “dWL“ “dbL“
- values: numpy arrays of zeros of the same shape as the corresponding gradients/parameters.
Arguments:
parameters -- python dictionary containing your parameters.
parameters[“W“ + str(l)] = Wl
parameters[“b“ + str(l)] = bl
Returns:
v -- python dictionary that will contain the exponentially weighted average of the gradient.
v[“dW“ + str(l)] = ...
v[“db“ + str(l)] = ...
s -- python dictionary that will contain the exponentially weighted average of the squared gradient.
s[“dW“ + str(l)] = ...
s[“db“ + str(l)] = ...
“““
L = len(parameters) // 2 # number of layers in the neural networks
v = {}
s = {}
# Initialize v s. Input: “parameters“. Outputs: “v s“.
for l in range(L):
### START CODE HERE ### (approx. 4 lines)
v[“dW“ + str(l+1)] = np.zeros(parameters[“W“ + str(l+1)].shape)
v[“db“ + str(l+1)] = np.zeros(parameters[“b“ + str(l+1)].shape)
s[“dW“ + str(l+1)] = np.zeros(parameters[“W“ + str(l+1)].shape)
s[“db“ + str(l+1)] = np.zeros(parameters[“b“ + str(l+1)].shape)
### END CODE HERE ###
return v s
def update_parameters_with_adam(parameters grads v s t learning_rate = 0.01
beta1 = 0.9 beta2 = 0.999 epsilon = 1e-8):
“““
Update parameters using Adam
Arguments:
parameters -- python dictionary containing your parameters:
parameters[‘W‘ + str(l)] = Wl
parameters[‘b‘ + str(l)] = bl
grads -- python dictionary containing your gradients for each parameters:
grads[‘dW‘ + str(l)] = dWl
grads[‘db‘ + str(l)] = dbl
v -- Adam variable moving average of the first gradient python dictionary
s -- Adam variable moving average of the squared gradient python dictionary
learning_rate -- the learning rate scalar.
beta1 -- Exponential decay hyperparameter for the first moment estimates
beta2 -- Exponential decay hyperparameter for the second moment estimates
epsilon -- hyperparameter preventing division by zero in Adam updates
Returns:
parameters -- python dictionary containing your updated parameters
v -- Adam variable moving average of the first gradient python dictionary
s -- Adam variable moving average of the squared gradient python dictionary
“““
L = len(parameters) // 2 # number of layers in the neural networks
v_corrected = {} # Initializing first moment estimat
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-02-20 21:33 5.1 循环序列模型\
目录 0 2018-03-02 00:33 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\
目录 0 2018-02-25 14:21 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\.ipynb_checkpoints\
文件 86391 2018-03-02 00:33 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\.ipynb_checkpoints\Building a Recurrent Neural Network-Step by Step-v3-checkpoint.ipynb
目录 0 2018-02-25 14:44 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\__pycache__\
文件 3910 2018-02-25 14:44 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\__pycache__\rnn_utils.cpython-36.pyc
文件 78502 2018-02-20 20:59 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\Building a Recurrent Neural Network-Step by Step-v1.ipynb
文件 78518 2018-02-20 20:59 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\Building a Recurrent Neural Network-Step by Step-v2.ipynb
文件 86391 2018-03-02 00:33 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\Building a Recurrent Neural Network-Step by Step-v3.ipynb
目录 0 2018-02-20 21:04 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\data\
文件 312514 2018-02-20 21:03 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\data\input.txt
目录 0 2018-02-20 21:07 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\images\
文件 143266 2018-02-20 21:06 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\images\initial_state.png
文件 193213 2018-02-20 21:06 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\images\LSTM.png
文件 85971 2018-02-20 21:06 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\images\LSTM_rnn.png
文件 95689 2018-02-20 21:06 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\images\rnn (1).png
文件 59480 2018-02-20 21:06 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\images\RNN.png
文件 149330 2018-02-20 21:06 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\images\rnn_cell_backprop.png
文件 142063 2018-02-20 21:06 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\images\rnn_step_forward.png
文件 5155 2018-02-20 21:00 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\rnn_utils.py
文件 94630 2018-02-20 21:00 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\shakespeare.txt
文件 4446 2018-02-20 21:00 5.1 循环序列模型\Building a Recurrent Neural Network -Step by Step\utils.py
目录 0 2018-03-04 18:56 5.1 循环序列模型\Dinosaur lsland --Character -level language model\
目录 0 2018-03-02 14:20 5.1 循环序列模型\Dinosaur lsland --Character -level language model\.ipynb_checkpoints\
文件 38357 2018-03-02 14:20 5.1 循环序列模型\Dinosaur lsland --Character -level language model\.ipynb_checkpoints\Dinosaurus Island--Character level language model final-v3-checkpoint.ipynb
目录 0 2018-03-02 16:25 5.1 循环序列模型\Dinosaur lsland --Character -level language model\__pycache__\
文件 4088 2018-03-02 16:25 5.1 循环序列模型\Dinosaur lsland --Character -level language model\__pycache__\shakespeare_utils.cpython-36.pyc
文件 4205 2018-03-02 14:30 5.1 循环序列模型\Dinosaur lsland --Character -level language model\__pycache__\utils.cpython-36.pyc
文件 19909 2018-02-20 21:11 5.1 循环序列模型\Dinosaur lsland --Character -level language model\dinos.txt
文件 37753 2018-02-20 21:11 5.1 循环序列模型\Dinosaur lsland --Character -level language model\Dinosaurus Island--Character level language model final-v1.ipynb
文件 37891 2018-02-20 21:11 5.1 循环序列模型\Dinosaur lsland --Character -level language model\Dinosaurus Island--Character level language model final-v2-Copy1.ipynb
............此处省略49个文件信息
相关资源
- [免费完整版]Neural Networks Tricks of the
- keras实现歌词的自动生成 所需的歌词
- 《超智能体》
- Hands-on-Machine-Learning-with-Scikit-高清带书
- vgg16_reducedfc.pth
- 神经网络与深度学习应用实战
- 动手学深度学习Pytorch版.zip
- 《深度学习Deep Learning 》中文版 高清
- PyTorch深度学习.pdf
- github上tensorflow-master源码
- 深度学习之PyTorch实战计算机视觉
- 中文翻译版Neural Networks and Deep Learni
- 李宏毅-一天搞懂深度学习 - pdf-有目录
- 深度学习DeepLearning
- 《神经网络与深度学习》源代码
- 深度学习基础网络模型(mnist手写体识
- 吴恩达UFLDL教程
- 深度学习:智能时代的核心驱动力量
- Deep Learning with R
- 深度学习基础(Fundamentals of Deep Lear
- 使用tensorflow实现CNN-RNN-GAN代码
- 金融股票深度学习论文整理
- 对《Secureml A system for scalable privacy-p
- Hands-On Machine Learning with Scikit-Learn Ke
- 深度学习方法及应用Deep Learning Metho
- 深度学习源代码162566
- 概率统计超入门
- 黄海广博士整理的吴恩达深度学习笔
- Neural Networks and Deep Learning-神经网络与
- 深度学习资料+官方文档
评论
共有 条评论