Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Deep Learning with TensorFlow

You're reading from   Deep Learning with TensorFlow Explore neural networks with Python

Arrow left icon
Product type Paperback
Published in Apr 2017
Publisher Packt
ISBN-13 9781786469786
Length 320 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (4):
Arrow left icon
 Zaccone Zaccone
Author Profile Icon Zaccone
Zaccone
 Milo Milo
Author Profile Icon Milo
Milo
 Karim Karim
Author Profile Icon Karim
Karim
 Menshawy Menshawy
Author Profile Icon Menshawy
Menshawy
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Title Page
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
1. Getting Started with Deep Learning FREE CHAPTER 2. First Look at TensorFlow 3. Using TensorFlow on a Feed-Forward Neural Network 4. TensorFlow on a Convolutional Neural Network 5. Optimizing TensorFlow Autoencoders 6. Recurrent Neural Networks 7. GPU Computing 8. Advanced TensorFlow Programming 9. Advanced Multimedia Programming with TensorFlow 10. Reinforcement Learning

Pretty Tensor


Pretty Tensor allows the developer to wrap TensorFlow operations, to quickly chain any number of layers to define neural networks.

The following is a simple example of the Pretty Tensor capabilities. We wrap a standard TensorFlow object, pretty, into a library compatible object, then we feed it through three fully connected layers, to finally output a softmax distribution:

pretty = tf.placeholder([None, 784], tf.float32) 
softmax = (prettytensor.wrap(examples) 
 .fully_connected(256, tf.nn.relu) 
 .fully_connected(128, tf.sigmoid) 
 .fully_connected(64, tf.tanh) 
 .softmax(10))

The Pretty Tensor installation is very simple; just use the pip installer:

sudo pip install prettytensor

Chaining layers

Pretty Tensor has three modes of operation, which share the ability to chain methods.

Normal mode

In normal mode, every time a method is called, a new Pretty Tensor is created. This allows for easy chaining, and yet you can still use any particular object multiple times. This makes it easy...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime
Visually different images