100% found this document useful (1 vote)
30 views

Introduction to Deep Learning 1st Edition Eugene Charniak instant download

The document provides links to various deep learning textbooks available for download, including titles by authors such as Ian Goodfellow and François Chollet. It also includes detailed contents of 'Introduction to Deep Learning' by Eugene Charniak, covering topics like neural networks, TensorFlow, and deep reinforcement learning. The book is published by MIT Press and is aimed at educating readers on deep learning concepts and applications.

Uploaded by

akhlkulley6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
30 views

Introduction to Deep Learning 1st Edition Eugene Charniak instant download

The document provides links to various deep learning textbooks available for download, including titles by authors such as Ian Goodfellow and François Chollet. It also includes detailed contents of 'Introduction to Deep Learning' by Eugene Charniak, covering topics like neural networks, TensorFlow, and deep reinforcement learning. The book is published by MIT Press and is aimed at educating readers on deep learning concepts and applications.

Uploaded by

akhlkulley6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Introduction to Deep Learning 1st Edition Eugene

Charniak download

https://ebookultra.com/download/introduction-to-deep-
learning-1st-edition-eugene-charniak/

Explore and download more ebooks or textbooks


at ebookultra.com
We have selected some products that you may be interested in
Click the link to download now or visit ebookultra.com
for more options!.

Deep Learning Ian Goodfellow

https://ebookultra.com/download/deep-learning-ian-goodfellow/

Practical Deep Learning A Python Based Introduction 1st


Edition Ronald T. Kneusel [Ron Kneusel]

https://ebookultra.com/download/practical-deep-learning-a-python-
based-introduction-1st-edition-ronald-t-kneusel-ron-kneusel/

Evolutionary Deep Learning MEAP V11 Micheal Lanham

https://ebookultra.com/download/evolutionary-deep-learning-
meap-v11-micheal-lanham/

Deep Learning with Python 1st Edition François Chollet

https://ebookultra.com/download/deep-learning-with-python-1st-edition-
francois-chollet/
Facilitating Deep Learning Pathways to Success for
University and College Teachers 1st Edition Julian Hermida

https://ebookultra.com/download/facilitating-deep-learning-pathways-
to-success-for-university-and-college-teachers-1st-edition-julian-
hermida/

Grokking Deep Reinforcement Learning 2020 Morales


9781617295454 1st Edition Miguel Morales

https://ebookultra.com/download/grokking-deep-reinforcement-
learning-2020-morales-9781617295454-1st-edition-miguel-morales/

Deep Learning How the Mind Overrides Experience 1st


Edition Stellan Ohlsson

https://ebookultra.com/download/deep-learning-how-the-mind-overrides-
experience-1st-edition-stellan-ohlsson/

Deep Learning Through Sparse and Low Rank Modeling


Zhangyang Wang

https://ebookultra.com/download/deep-learning-through-sparse-and-low-
rank-modeling-zhangyang-wang/

An Elementary Introduction to Statistical Learning Theory


1st Edition Sanjeev Kulkarni

https://ebookultra.com/download/an-elementary-introduction-to-
statistical-learning-theory-1st-edition-sanjeev-kulkarni/
Introduction to Deep Learning 1st Edition Eugene
Charniak Digital Instant Download
Author(s): Eugene Charniak
ISBN(s): 9780262039512, 0262039516
Edition: 1
File Details: PDF, 16.33 MB
Year: 2019
Language: english
Introduction to Deep Learning
Introduction to Deep Learning

Eugene Charniak

The MIT Press


Cambridge, Massachusetts
London, England
c 2018 The Massachusetts Institute of Technology

All rights reserved. No part of this book may be reproduced in any form by any
electronic or mechanical means (including photocopying, recording, or
information storage and retrieval) without permission in writing from the
publisher.

This book was set in LATEX by author. Printed and bound in the United States of
America.

Library of Congress Cataloging-in-Publication Data is available.


ISBN: 978-0-262-03951-2

10 9 8 7 6 5 4 3 2 1
To my family, once more
Contents

Preface xi

1 Feed-Forward Neural Nets 1


1.1 Perceptrons . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Cross-entropy Loss Functions for Neural Nets . . . . . . . . . 9
1.3 Derivatives and Stochastic Gradient Descent . . . . . . . . . . 14
1.4 Writing Our Program . . . . . . . . . . . . . . . . . . . . . . 18
1.5 Matrix Representation of Neural Nets . . . . . . . . . . . . . 21
1.6 Data Independence . . . . . . . . . . . . . . . . . . . . . . . . 24
1.7 References and Further Readings . . . . . . . . . . . . . . . . 25
1.8 Written Exercises . . . . . . . . . . . . . . . . . . . . . . . . . 26

2 Tensorflow 29
2.1 Tensorflow Preliminaries . . . . . . . . . . . . . . . . . . . . . 29
2.2 A TF Program . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.3 Multilayered NNs . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.4 Other Pieces . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.4.1 Checkpointing . . . . . . . . . . . . . . . . . . . . . . 42
2.4.2 tensordot . . . . . . . . . . . . . . . . . . . . . . . . 43
2.4.3 Initialization of TF Variables . . . . . . . . . . . . . . 44
2.4.4 Simplifying TF Graph Creation . . . . . . . . . . . . . 47
2.5 References and Further Readings . . . . . . . . . . . . . . . . 48
2.6 Written Exercises . . . . . . . . . . . . . . . . . . . . . . . . . 49

3 Convolutional Neural Networks 51


3.1 Filters, Strides, and Padding . . . . . . . . . . . . . . . . . . 52
3.2 A Simple TF Convolution Example . . . . . . . . . . . . . . . 57
3.3 Multilevel Convolution . . . . . . . . . . . . . . . . . . . . . . 61
3.4 Convolution Details . . . . . . . . . . . . . . . . . . . . . . . 64

vii
viii CONTENTS

3.4.1 Biases . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
3.4.2 Layers with Convolution . . . . . . . . . . . . . . . . . 65
3.4.3 Pooling . . . . . . . . . . . . . . . . . . . . . . . . . . 66
3.5 References and Further Readings . . . . . . . . . . . . . . . . 67
3.6 Written Exercises . . . . . . . . . . . . . . . . . . . . . . . . . 68

4 Word Embeddings and Recurrent NNs 71


4.1 Word Embeddings for Language Models . . . . . . . . . . . . 71
4.2 Building Feed-Forward Language Models . . . . . . . . . . . . 76
4.3 Improving Feed-Forward Language Models . . . . . . . . . . . 78
4.4 Overfitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
4.5 Recurrent Networks . . . . . . . . . . . . . . . . . . . . . . . 82
4.6 Long Short-Term Memory . . . . . . . . . . . . . . . . . . . . 88
4.7 References and Further Readings . . . . . . . . . . . . . . . . 92
4.8 Written Exercises . . . . . . . . . . . . . . . . . . . . . . . . . 92

5 Sequence-to-Sequence Learning 95
5.1 The Seq2Seq Paradigm . . . . . . . . . . . . . . . . . . . . . . 96
5.2 Writing a Seq2Seq MT program . . . . . . . . . . . . . . . . . 99
5.3 Attention in Seq2seq . . . . . . . . . . . . . . . . . . . . . . . 102
5.4 Multilength Seq2Seq . . . . . . . . . . . . . . . . . . . . . . . 107
5.5 Programming Exercise . . . . . . . . . . . . . . . . . . . . . . 108
5.6 Written Exercises . . . . . . . . . . . . . . . . . . . . . . . . . 110
5.7 References and Further Readings . . . . . . . . . . . . . . . . 111

6 Deep Reinforcement Learning 113


6.1 Value Iteration . . . . . . . . . . . . . . . . . . . . . . . . . . 114
6.2 Q-learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
6.3 Basic Deep-Q Learning . . . . . . . . . . . . . . . . . . . . . . 119
6.4 Policy Gradient Methods . . . . . . . . . . . . . . . . . . . . 124
6.5 Actor-Critic Methods . . . . . . . . . . . . . . . . . . . . . . 130
6.6 Experience Replay . . . . . . . . . . . . . . . . . . . . . . . . 133
6.7 References and Further Readings . . . . . . . . . . . . . . . . 134
6.8 Written Exercises . . . . . . . . . . . . . . . . . . . . . . . . . 134

7 Unsupervised Neural-Network Models 137


7.1 Basic Autoencoding . . . . . . . . . . . . . . . . . . . . . . . 137
7.2 Convolutional Autoencoding . . . . . . . . . . . . . . . . . . . 140
7.3 Variational Autoencoding . . . . . . . . . . . . . . . . . . . . 144
7.4 Generative Adversarial Networks . . . . . . . . . . . . . . . . 152
CONTENTS ix

7.5 References and Further Readings . . . . . . . . . . . . . . . . 157


7.6 Written Exercises . . . . . . . . . . . . . . . . . . . . . . . . . 157

A Answers to Selected Exercises 159


A.1 Chapter 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
A.2 Chapter 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
A.3 Chapter 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
A.4 Chapter 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
A.5 Chapter 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
A.6 Chapter 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
A.7 Chapter 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

Bibliography 165

Index 169
Preface

Your author is a long-time artificial-intelligence researcher whose field of ex-


pertise, natural-language processing, has been revolutionized by deep learn-
ing. Unfortunately, it took him (me) a long time to catch on to this fact. I
can rationalize this since this is the third time neural networks have threat-
ened a revolution but only the first time they have delivered. Nevertheless, I
suddenly found myself way behind the times and struggling to catch up. So
I did what any self-respecting professor would do, scheduled myself to teach
the stuff, started a crash course by surfing the web, and got my students to
teach it to me. (This last is not a joke. In particular, the head undergradu-
ate teaching assistant for the course, Siddarth (Sidd) Karramcheti, deserves
special mention.)
This explains several prominent features of this book. First, it is short.
I am a slow learner. Second, it is very much project driven. Many texts,
particularly in computer science, have a constant tension between topic or-
ganization and organizing material around specific projects. Splitting the
difference is often a good idea, but I find I learn computer science material
best by sitting down and writing programs, so my book largely reflects my
learning habits. It was the most convenient way to put it down, and I am
hoping many in the expected audience will find it helpful as well.
Which brings up the question of the expected audience. While I hope
many CS practitioners will find this book useful for the same reason I wrote
it, as a teacher my first loyalty is to my students, so this book is primarily
intended as a textbook for a course on deep learning. The course I teach at
Brown is for both graduate and undergraduates and covers all the material
herein, plus some “culture” lectures (for graduate credit a student must add
a significant final project). Both linear algebra and multivariate calculus are
required. While the actual quantity of linear-algebra material is not that
great, students have told me that without it they would have found think-
ing about multilevel networks, and the tensors they require, quite difficult.
Multivariate calculus, however, was a much closer call. It appears explicitly

xi
xii PREFACE

only in Chapter 1, when we build up to back-propagation from scratch and


I would not be surprised if an extra lecture on partial derivatives would do.
Last, there is a probability and statistics prerequisite. This simplifies the
exposition and I certainly want to encourage students to take such a course.
I also assume a rudimentary knowledge of programming in Python. I do not
include this in the text, but my course has an extra “lab” on basic Python.
That your author was playing catch-up when writing this book also
explains the fact that in almost every chapter’s section on further reading
you will find, beyond the usual references to important research papers,
many reference to secondary sources — others’ educational writings. I would
never have learned this material without them.

Providence, Rhode Island


January 2018
Chapter 1

Feed-Forward Neural Nets

It is standard to start exploring deep learning (or neural nets — we use


the terms interchangeably) with their use in computer vision. This area of
artificial intelligence has been revolutionized by the technique and its basic
starting point — light intensity — is represented naturally by real numbers,
which are what neural nets manipulate.
To make this more concrete, consider the problem of identifying hand-
written digits — the numbers from zero to nine. If we were to start from
scratch, we would first need to build a camera to focus light rays in order
to build up an image of what we see. We would then need light sensors
to turn the light rays into electrical impulses that a computer can “sense.”
And finally, since we are dealing with digital computers, we would need to
discretize the image — that is, represent the colors and intensities of the light
as numbers in a two-dimensional array. Fortunately, we have a dataset on
line in which all this has been done for us — the Mnist dataset (pronounced
“em-nist”). (The “nist” here comes from the U.S. National Institute of
Standards (or nist), which was responsible for gathering the data.) In this
data each image is a 28 ∗ 28 array of integers as in Figure 1.1. (I have
removed the left and right border regions to make it fit better on the page.)
In Figure 1.1, 0 can be thought of as white, 255 as black, and numbers
in between as shades of gray. We call these numbers pixel values, where a
pixel is the smallest portion of an image that our computer can resolve. The
actual “size” of the area in the world represented by a pixel depends on our
camera, how far away it is from the object surface, etc. But for our simple
digit problem we need not worry about this. The black and white image is
show in Figure 1.2.
Looking at this image closely can suggest some simpleminded ways we

1
2 CHAPTER 1. FEED-FORWARD NEURAL NETS

7 8 9 10 11 12 13 14 15 16 17 18 19 20
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0 0 0 0 0 0 0
3 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5 0 0 0 0 0 0 0 0 0 0 0 0 0 0
6 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 185 159 151 60 36 0 0 0 0 0 0 0 0 0
8 254 254 254 254 241 198 198 198 198 198 198 198 198 170
9 114 72 114 163 227 254 225 254 254 254 250 229 254 254
10 0 0 0 0 17 66 14 67 67 67 59 21 236 254
11 0 0 0 0 0 0 0 0 0 0 0 83 253 209
12 0 0 0 0 0 0 0 0 0 0 22 233 255 83
13 0 0 0 0 0 0 0 0 0 0 129 254 238 44
14 0 0 0 0 0 0 0 0 0 59 249 254 62 0
15 0 0 0 0 0 0 0 0 0 133 254 187 5 0
16 0 0 0 0 0 0 0 0 9 205 248 58 0 0
17 0 0 0 0 0 0 0 0 126 254 182 0 0 0
18 0 0 0 0 0 0 0 75 251 240 57 0 0 0
19 0 0 0 0 0 0 19 221 254 166 0 0 0 0
20 0 0 0 0 0 3 203 254 219 35 0 0 0 0
21 0 0 0 0 0 38 254 254 77 0 0 0 0 0
22 0 0 0 0 31 224 254 115 1 0 0 0 0 0
23 0 0 0 0 133 254 254 52 0 0 0 0 0 0
24 0 0 0 61 242 254 254 52 0 0 0 0 0 0
25 0 0 0 121 254 254 219 40 0 0 0 0 0 0
26 0 0 0 121 254 207 18 0 0 0 0 0 0 0
27 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Figure 1.1: An Mnist discretized version of an image

Figure 1.2: A black on white image from the pixels of Figure 1.1
Random documents with unrelated
content Scribd suggests to you:
back
back
back
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookultra.com

You might also like