楼主: andrewfu1988
10877 21

Deep Learning with Python Jason Brownlee [推广有奖]

  • 1关注
  • 3粉丝

讲师

9%

还不是VIP/贵宾

-

威望
0
论坛币
4500 个
通用积分
2.6130
学术水平
6 点
热心指数
6 点
信用等级
3 点
经验
1935 点
帖子
109
精华
0
在线时间
703 小时
注册时间
2010-6-12
最后登录
2023-1-30

相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
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, Con gure 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 De ne 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 Con gurations . . . . . . . . . . . . . . . . . . . 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 Classi cation Of Flower Species 59
10.1 Iris Flowers Classi cation 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 De ne The Neural Network Model . . . . . . . . . . . . . . . . . . . . . . . . . 62
10.7 Evaluate The Model with k-Fold Cross Validation . . . . . . . . . . . . . . . . . 62
10.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
11 Project: Binary Classi cation Of Sonar Returns 64
11.1 Sonar Object Classi cation 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 Over tting 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 Classi cation 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
vi
20.10Tips For Augmenting Image Data with Keras . . . . . . . . . . . . . . . . . . . 138
20.11Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
21 Project Object Recognition in Photographs 140
21.1 Photograph Object Recognition Dataset . . . . . . . . . . . . . . . . . . . . . . 140
21.2 Loading The CIFAR-10 Dataset in Keras . . . . . . . . . . . . . . . . . . . . . . 141
21.3 Simple CNN for CIFAR-10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
21.4 Larger CNN for CIFAR-10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
21.5 Extensions To Improve Model Performance . . . . . . . . . . . . . . . . . . . . . 148
21.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
22 Project: Predict Sentiment From Movie Reviews 150
22.1 Movie Review Sentiment Classi cation Dataset . . . . . . . . . . . . . . . . . . 150
22.2 Load the IMDB Dataset With Keras . . . . . . . . . . . . . . . . . . . . . . . . 151
22.3 Word Embeddings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
22.4 Simple Multi-Layer Perceptron Model . . . . . . . . . . . . . . . . . . . . . . . . 154
22.5 One-Dimensional Convolutional Neural Network . . . . . . . . . . . . . . . . . . 156
22.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
VI Conclusions 158
23 How Far You Have Come 159
24 Getting More Help 160
24.1 Arti cial Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
24.2 Deep Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
24.3 Python Machine Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
24.4 Keras Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 deep_learning_with_python_code.zip (134.28 KB, 需要: 5 个论坛币)

deep_learning_with_python.pdf (2.49 MB, 需要: 10 个论坛币)




二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Learning earning python Brown Jason

本帖被以下文库推荐

沙发
军旗飞扬 发表于 2017-8-25 11:42:53 |只看作者 |坛友微信交流群
谢谢楼主分享!

使用道具

藤椅
西门高 发表于 2017-8-25 12:26:08 |只看作者 |坛友微信交流群
谢谢分享

使用道具

板凳
ethan0423 在职认证  发表于 2017-8-29 10:21:27 |只看作者 |坛友微信交流群
谢谢, 下來研究

使用道具

报纸
clb_polaris 发表于 2017-8-30 09:09:37 |只看作者 |坛友微信交流群
谢谢分享

使用道具

楼主,有Long Short-Term Memory Networks With Python这本书吗,同一个作者,也是 Jason Brownlee

使用道具

7
__sunshine 发表于 2017-10-9 15:29:06 |只看作者 |坛友微信交流群
多谢分享!

使用道具

8
__sunshine 发表于 2017-10-9 15:30:32 |只看作者 |坛友微信交流群
多谢分享!正在研究deep learning。该书是否适合新手学习

使用道具

9
baiwei1637124 学生认证  发表于 2017-10-12 13:26:57 |只看作者 |坛友微信交流群
楼主威武,多谢分享~

使用道具

10
CvShrimp 发表于 2017-11-15 15:20:19 |只看作者 |坛友微信交流群
支持!!!!!!

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加JingGuanBbs
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-23 19:00