深度学习初识
一、入门基本概念
机器学习简介
机器学习:无序数据转化为价值的方法 机器学习价值:从数据中抽取规律,并预测未来
机器学习应用举例
- 分类问题:图像识别、垃圾邮件识别
- 回归问题:股价预测、房价预测
- 排序问题:点击率预估、推荐
- 生成问题:图像生成、图像风格转换、图像文字描述生成
机器学习应用流程
![image-20190405103241674](https://img.cntofu.com/book/fullstack-tutorial/notes/DeepLearning/assets/image-20190405103241674.png)
机器学习岗位职责
- 数据处理(采集+去噪)
- 模型训练(特征+模型)
- 模型评估与优化(MSE、F1-score、AUC+调参)
- 模型应用(A/B测试)
深度学习简介
![img](https://img.cntofu.com/book/fullstack-tutorial/notes/DeepLearning/assets/b248f2b9d659c18808a7b75d7537dea09a886564.jpg)
人工智能、机器学习、深度学习之间的关系
人工智能(AI)> 机器学习(Machine Learning)> 深度学习(Deep learning)
深度学习与机器学习关系
- 机器学习是实现人工智能的方法
- 深度学习是实现机器学习算法的技术
深度学习算法集合
- 卷积神经网络(Convolutional Neural Network, CNN)
- 循环神经网络(Recurrent Neural Networks,RNNs)
- 自动编码器
- 稀疏编码
- 深度信念网络
- 深度学习 + 强化学习 = 深度强化学习
深度学习进展
- 图像分类
ImageNet: http://image-net.org/
![v2-718f95df083b2d715ee29b018d9eb5c2_1200x500](https://img.cntofu.com/book/fullstack-tutorial/notes/DeepLearning/assets/v2-718f95df083b2d715ee29b018d9eb5c2_1200x500.jpg)
- 机器翻译
![机器翻译](https://img.cntofu.com/book/fullstack-tutorial/notes/DeepLearning/assets/640.jpeg)
- 图像生成
![image_1_0_0](https://img.cntofu.com/book/fullstack-tutorial/notes/DeepLearning/assets/image_1_0_0.jpg)
![v2-4bcf97eff1afd63aab37c95d751f270f_r](https://img.cntofu.com/book/fullstack-tutorial/notes/DeepLearning/assets/v2-4bcf97eff1afd63aab37c95d751f270f_r.jpg)
![river-starrynight-combined](https://img.cntofu.com/book/fullstack-tutorial/notes/DeepLearning/assets/river-starrynight-combined.png)
-
字体生成
-
AlphaGo
二、神经网络
人体神经元模型
神经网络模型是模仿人类的大脑神经构造而构造的。先来看人体神经元模型。
![img](https://img.cntofu.com/book/fullstack-tutorial/notes/DeepLearning/assets/neural-network-3.png)
神经元的可以分为四个区域:
- 接收区(receptive zone):树突接收到输入信息。
- 触发区(trigger zone):位于轴突和细胞体交接的地方,决定是否产生神经冲动。
- 传导区(conducting zone):由轴突进行神经冲动的传递。
- 输出区(output zone):神经冲动的目的就是要让神经末梢,突触的神经递质或电力释出,才能影响下一个接受的细胞(神经元、肌肉细胞或是腺体细胞),此称为突触传递。
人工神经网络
人工神经网络(ANN:Artificial Neural Network),简称神经网络(NN:Neural Network)。迄今为止,人工神经网络尚无统一定义, 其实一种模拟了人体神经元构成的数学模型,依靠系统的复杂程度,通过调整内部大量节点之间相互连接的关系,从而达到处理信息的目的。
![img](https://img.cntofu.com/book/fullstack-tutorial/notes/DeepLearning/assets/1*OvTgvr5SNAp579n9kyBzAw.png)
上图显示了人工神经网络是一个分层模型,逻辑上可以分为三层:
- 输入层:输入层接收特征向量 x 。
- 输出层:输出层产出最终的预测 h 。
- 隐含层:隐含层介于输入层与输出层之间,之所以称之为隐含层,是因为当中产生的值并不像输入层使用的样本矩阵 X 或者输出层用到的标签矩阵 y 那样直接可见。
1. 神经元
![img](https://img.cntofu.com/book/fullstack-tutorial/notes/DeepLearning/assets/2112343587-5b78f2b533cd1.png)
![img](https://img.cntofu.com/book/fullstack-tutorial/notes/DeepLearning/assets/3893839953-5b78f3ea9066e.png)
![image-20190405111251357](https://img.cntofu.com/book/fullstack-tutorial/notes/DeepLearning/assets/image-20190405111251357.png)
2. 逻辑回归模型
神经元 -> 激活函数sigmoid -> 二元类逻辑斯蒂回归模型
![img](https://img.cntofu.com/book/fullstack-tutorial/notes/DeepLearning/assets/1388465484-5b78f514b3a47.png)
神经元 -> 多输出
![img](https://image-static.segmentfault.com/342/024/3420244370-5b78f5943f6bc)
多输出神经元 -> softmax -> 多分类逻辑斯蒂回归模型
![image-20190405111638911](https://img.cntofu.com/book/fullstack-tutorial/notes/DeepLearning/assets/image-20190405111638911.png)
![image-20190405111848924](https://img.cntofu.com/book/fullstack-tutorial/notes/DeepLearning/assets/image-20190405111848924.png)
![image-20190405111934921](https://img.cntofu.com/book/fullstack-tutorial/notes/DeepLearning/assets/image-20190405111934921.png)
目标函数
也称为损失函数,衡量对数据的拟合程度
梯度下降
![img](https://img.cntofu.com/book/fullstack-tutorial/notes/DeepLearning/assets/gradient.png)
三、Tensorflow基础
Tensorflow简介
Google Brain 第二代机器学习框架
计算图模型
![img](https://img.cntofu.com/book/fullstack-tutorial/notes/DeepLearning/assets/1867956752-5b78fbe0b8f6b.png)
TensorFlow 安装
- 基于 VirtualEnv 的安装
- 原生 pip
- Docker
- 从源代码安装
参考资料