learning_tensorflow_1ed.pdf

(12962 KB) Pobierz
TensorFlow
A GUIDE TO BUILDING DEEP LEARNING SYSTEMS
Learning
Tom Hope, Yehezkel S. Resheff & Itay Lieder
A Guide to Building Deep Learning Systems
Learning TensorFlow
Tom Hope, Yehezkel S. Resheff, and Itay Lieder
Beijing
Boston Farnham Sebastopol
Tokyo
Learning TensorFlow
by Tom Hope, Yehezkel S. Resheff, and Itay Lieder
Copyright © 2017 Tom Hope, Itay Lieder, and Yehezkel S. Resheff. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (http://oreilly.com/safari). For more information, contact our corporate/insti‐
tutional sales department: 800-998-9938 or
corporate@oreilly.com.
Editor:
Nicole Tache
Production Editor:
Shiny Kalapurakkel
Copyeditor:
Rachel Head
Proofreader:
Sharon Wilkey
August 2017:
First Edition
Indexer:
Judith McConville
Interior Designer:
David Futato
Cover Designer:
Karen Montgomery
Illustrator:
Rebecca Demarest
Revision History for the First Edition
2017-08-04:
2017-09-15:
2018-04-13:
First Release
Second Release
Third Release
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc.
Learning TensorFlow,
the cover image,
and related trade dress are trademarks of O’Reilly Media, Inc.
While the publisher and the authors have used good faith efforts to ensure that the information and
instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility
for errors or omissions, including without limitation responsibility for damages resulting from the use of
or reliance on this work. Use of the information and instructions contained in this work is at your own
risk. If any code samples or other technology this work contains or describes is subject to open source
licenses or the intellectual property rights of others, it is your responsibility to ensure that your use
thereof complies with such licenses and/or rights.
978-1-491-97851-1
[LSI]
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
1.
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Going Deep
Using TensorFlow for AI Systems
TensorFlow: What’s in a Name?
A High-Level Overview
Summary
Installing TensorFlow
Hello World
MNIST
Softmax Regression
Summary
1
2
5
6
8
2.
Go with the Flow: Up and Running with TensorFlow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
9
11
13
14
21
3.
Understanding TensorFlow Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Computation Graphs
What Is a Computation Graph?
The Benefits of Graph Computations
Graphs, Sessions, and Fetches
Creating a Graph
Creating a Session and Running It
Constructing and Managing Our Graph
Fetches
Flowing Tensors
Nodes Are Operations, Edges Are Tensor Objects
Data Types
23
23
24
24
25
26
27
29
30
30
32
iii
Zgłoś jeśli naruszono regulamin