Improvise a Jazz Solo with an LSTM Network 实现使用LSTM生成音乐的模型,你可以在结束时听你自己的音乐,接下来你将会学习到: 使用LSTM生成音乐 使用深度学习生成你自己的爵士乐 现在加载库,其中,music21可能不在你的环境内,你需要在命令行中执行pip install msgpack以及pip install music21来获取. from __future__ import print_function import IPython impo…
Initialization 如何选择初始化方式,不同的初始化会导致不同的结果 好的初始化方式: 加速梯度下降的收敛(Speed up the convergence of gradient descent) 增加梯度下降 收敛成 一个低错误训练(和 普遍化)的几率(Increase the odds of gradient descent converging to a lower training (and generalization) error) To get started, run…
Regularization Deep Learning models have so much flexibility and capacity that overfitting can be a serious problem,if the training dataset is not big enough. Sure it does well on the training set, but the learned network doesn't generalize to new ex…
1. Gradient Checking 你被要求搭建一个Deep Learning model来检测欺诈,每当有人付款,你想知道是否该支付可能是欺诈,例如该用户的账户可能已经被黑客掉. 但是,反向传播实现起来非常有挑战,并且有时有一些bug,因为这是一个mission-critical应用,你公司老板想让十分确定,你实现的反向传播是正确的.你需要用"gradient checking"来证明你的反向传播是正确的. # Packages import numpy as np from…
一步步搭建循环神经网络 将在numpy中实现一个循环神经网络 Recurrent Neural Networks (RNN) are very effective for Natural Language Processing and other sequence tasks because they have "memory". 他们可以读取一个输入 \(x^{\langle t \rangle}\) (such as words) one at a time, 并且通过隐藏层激活…
1. Neural Machine Translation 下面将构建一个神经机器翻译(NMT)模型,将人类可读日期 ("25th of June, 2009") 转换为机器可读日期 ("2009-06-25"). 使用 attention model. from keras.layers import Bidirectional, Concatenate, Permute, Dot, Input, LSTM, Multiply from keras.layers…
1. Trigger Word Detection 我们的触发词将是 "Activate.".每当它听到你说 "Activate.",它就会发出 "chiming" 的声音. 在此作业结束时,您将能够记录您自己谈话的片段,并让算法在检测到您说"Activate."时触发一个钟声: 构成一个语音识别项目 合成和处理音频记录以创建train/dev数据集 训练触发词检测模型 并 进行预测 import numpy as np fr…
有哪些sequence model Notation: RNN - Recurrent Neural Network 传统NN 在解决sequence input 时有什么问题? RNN就没有上面的问题. 注意这里还提到了BRNN 双向RNN的概念. 激活函数 g1 经常用的是tanh, 也有用relu的但是不常用 Backpropagation through time Difference types of RNNs Language model and sequence generatio…
I have had a hard time trying to understand recurrent model. Compared to Ng's deep learning course, I found Deep Learning book written by Ian, Yoshua and Aaron much easier to understand. This post is structure in following order: Intuitive interpreta…
1.二维数组中的查找 题目描述 在一个二维数组中,每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序.请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数. 思路: 利用二维数组由上到下,由左到右递增的规律, 那么选取右上角a[row][col]与target进行比较,如果等于就直接找到, 当target小于元素a[row][col]时,那么target必定在元素a所在行的左边, 即col--: 当target大于元素a[row][col]时,那么tar…