没有合适的资源?快使用搜索试试~ 我知道了~
首页Deep Learning With Python - Jason Brownlee
Deep Learning With Python - Jason Brownlee
4星 · 超过85%的资源 需积分: 20 19 下载量 11 浏览量
更新于2023-03-16
评论
收藏 2.48MB PDF 举报
Develop Deep Learning models on Theano and Tensorflow and Keras by Jason Brownlee
资源详情
资源评论
资源推荐
Contents
Preface iii
I Introduction 1
1 Welcome 2
1.1 Deep Learning The Wrong Way . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Deep Learning With Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Book Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Requirements For This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.5 Your Outcomes From Reading This Book . . . . . . . . . . . . . . . . . . . . . . 7
1.6 What This Book is Not . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
II Background 9
2 Introduction to Theano 10
2.1 What is Theano? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2 How to Install Theano . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3 Simple Theano Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.4 Extensions and Wrappers for Theano . . . . . . . . . . . . . . . . . . . . . . . . 12
2.5 More Theano Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3 Introduction to TensorFlow 14
3.1 What is TensorFlow? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2 How to Install TensorFlow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3 Your First Examples in TensorFlow . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.4 Simple TensorFlow Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.5 More Deep Learning Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4 Introduction to Keras 17
4.1 What is Keras? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2 How to Install Keras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.3 Theano and TensorFlow Backends for Keras . . . . . . . . . . . . . . . . . . . . 18
ii
iii
4.4 Build Deep Learning Models with Keras . . . . . . . . . . . . . . . . . . . . . . 19
4.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5 Project: Develop Large Models on GPUs Cheaply In the Cloud 21
5.1 Project Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.2 Setup Your AWS Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.3 Launch Your Server Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.4 Login, Configure and Run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.5 Close Your EC2 Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.6 Tips and Tricks for Using Keras on AWS . . . . . . . . . . . . . . . . . . . . . . 31
5.7 More Resources For Deep Learning on AWS . . . . . . . . . . . . . . . . . . . . 31
5.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
III Multi-Layer Perceptrons 33
6 Crash Course In Multi-Layer Perceptrons 34
6.1 Crash Course Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6.2 Multi-Layer Perceptrons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
6.3 Neurons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
6.4 Networks of Neurons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
6.5 Training Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
6.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
7 Develop Your First Neural Network With Keras 40
7.1 Tutorial Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
7.2 Pima Indians Onset of Diabetes Dataset . . . . . . . . . . . . . . . . . . . . . . 41
7.3 Load Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7.4 Define Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7.5 Compile Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
7.6 Fit Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
7.7 Evaluate Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
7.8 Tie It All Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
7.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
8 Evaluate The Performance of Deep Learning Models 47
8.1 Empirically Evaluate Network Configurations . . . . . . . . . . . . . . . . . . . 47
8.2 Data Splitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
8.3 Manual k-Fold Cross Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
8.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
9 Use Keras Models With Scikit-Learn For General Machine Learning 53
9.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
9.2 Evaluate Deep Learning Models with Cross Validation . . . . . . . . . . . . . . 54
9.3 Grid Search Deep Learning Model Parameters . . . . . . . . . . . . . . . . . . . 55
9.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
iv
10 Project: Multiclass Classification Of Flower Species 59
10.1 Iris Flowers Classification Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . 59
10.2 Import Classes and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
10.3 Initialize Random Number Generator . . . . . . . . . . . . . . . . . . . . . . . . 60
10.4 Load The Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
10.5 Encode The Output Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
10.6 Define The Neural Network Model . . . . . . . . . . . . . . . . . . . . . . . . . 62
10.7 Evaluate The Model with k-Fold Cross Validation . . . . . . . . . . . . . . . . . 62
10.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
11 Project: Binary Classification Of Sonar Returns 64
11.1 Sonar Object Classification Dataset . . . . . . . . . . . . . . . . . . . . . . . . . 64
11.2 Baseline Neural Network Model Performance . . . . . . . . . . . . . . . . . . . . 65
11.3 Improve Performance With Data Preparation . . . . . . . . . . . . . . . . . . . 67
11.4 Tuning Layers and Neurons in The Model . . . . . . . . . . . . . . . . . . . . . 67
11.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
12 Project: Regression Of Boston House Prices 71
12.1 Boston House Price Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
12.2 Develop a Baseline Neural Network Model . . . . . . . . . . . . . . . . . . . . . 72
12.3 Lift Performance By Standardizing The Dataset . . . . . . . . . . . . . . . . . . 74
12.4 Tune The Neural Network Topology . . . . . . . . . . . . . . . . . . . . . . . . . 75
12.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
IV Advanced Multi-Layer Perceptrons and Keras 78
13 Save Your Models For Later With Serialization 79
13.1 Tutorial Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
13.2 Save Your Neural Network Model to JSON . . . . . . . . . . . . . . . . . . . . . 80
13.3 Save Your Neural Network Model to YAML . . . . . . . . . . . . . . . . . . . . 82
13.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
14 Keep The Best Models During Training With Checkpointing 85
14.1 Checkpointing Neural Network Models . . . . . . . . . . . . . . . . . . . . . . . 85
14.2 Checkpoint Neural Network Model Improvements . . . . . . . . . . . . . . . . . 86
14.3 Checkpoint Best Neural Network Model Only . . . . . . . . . . . . . . . . . . . 87
14.4 Loading a Check-Pointed Neural Network Model . . . . . . . . . . . . . . . . . . 88
14.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
15 Understand Model Behavior During Training By Plotting History 90
15.1 Access Model Training History in Keras . . . . . . . . . . . . . . . . . . . . . . 90
15.2 Visualize Model Training History in Keras . . . . . . . . . . . . . . . . . . . . . 91
15.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
v
16 Reduce Overfitting With Dropout Regularization 94
16.1 Dropout Regularization For Neural Networks . . . . . . . . . . . . . . . . . . . . 94
16.2 Dropout Regularization in Keras . . . . . . . . . . . . . . . . . . . . . . . . . . 95
16.3 Using Dropout on the Visible Layer . . . . . . . . . . . . . . . . . . . . . . . . . 96
16.4 Using Dropout on Hidden Layers . . . . . . . . . . . . . . . . . . . . . . . . . . 97
16.5 Tips For Using Dropout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
16.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
17 Lift Performance With Learning Rate Schedules 99
17.1 Learning Rate Schedule For Training Models . . . . . . . . . . . . . . . . . . . . 99
17.2 Ionosphere Classification Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . 100
17.3 Time-Based Learning Rate Schedule . . . . . . . . . . . . . . . . . . . . . . . . 100
17.4 Drop-Based Learning Rate Schedule . . . . . . . . . . . . . . . . . . . . . . . . . 103
17.5 Tips for Using Learning Rate Schedules . . . . . . . . . . . . . . . . . . . . . . . 105
17.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
V Convolutional Neural Networks 107
18 Crash Course In Convolutional Neural Networks 108
18.1 The Case for Convolutional Neural Networks . . . . . . . . . . . . . . . . . . . . 108
18.2 Building Blocks of Convolutional Neural Networks . . . . . . . . . . . . . . . . . 109
18.3 Convolutional Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
18.4 Pooling Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
18.5 Fully Connected Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
18.6 Worked Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
18.7 Convolutional Neural Networks Best Practices . . . . . . . . . . . . . . . . . . . 111
18.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
19 Project: Handwritten Digit Recognition 113
19.1 Handwritten Digit Recognition Dataset . . . . . . . . . . . . . . . . . . . . . . . 113
19.2 Loading the MNIST dataset in Keras . . . . . . . . . . . . . . . . . . . . . . . . 114
19.3 Baseline Model with Multi-Layer Perceptrons . . . . . . . . . . . . . . . . . . . 115
19.4 Simple Convolutional Neural Network for MNIST . . . . . . . . . . . . . . . . . 118
19.5 Larger Convolutional Neural Network for MNIST . . . . . . . . . . . . . . . . . 121
19.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
20 Improve Model Performance With Image Augmentation 126
20.1 Keras Image Augmentation API . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
20.2 Point of Comparison for Image Augmentation . . . . . . . . . . . . . . . . . . . 127
20.3 Sample Standardization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
20.4 Feature Standardization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
20.5 ZCA Whitening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
20.6 Random Rotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
20.7 Random Shifts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
20.8 Random Flips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
20.9 Saving Augmented Images to File . . . . . . . . . . . . . . . . . . . . . . . . . . 137
剩余167页未读,继续阅读
weixin_42104626
- 粉丝: 1
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- ExcelVBA中的Range和Cells用法说明.pdf
- 基于单片机的电梯控制模型设计.doc
- 主成分分析和因子分析.pptx
- 共享笔记服务系统论文.doc
- 基于数据治理体系的数据中台实践分享.pptx
- 变压器的铭牌和额定值.pptx
- 计算机网络课程设计报告--用winsock设计Ping应用程序.doc
- 高电压技术课件:第03章 液体和固体介质的电气特性.pdf
- Oracle商务智能精华介绍.pptx
- 基于单片机的输液滴速控制系统设计文档.doc
- dw考试题 5套.pdf
- 学生档案管理系统详细设计说明书.doc
- 操作系统PPT课件.pptx
- 智慧路边停车管理系统方案.pptx
- 【企业内控系列】企业内部控制之人力资源管理控制(17页).doc
- 温度传感器分类与特点.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1