Deep Learning with Theano
eBook - ePub

Deep Learning with Theano

Christopher Bourez

Share book
  1. 300 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Deep Learning with Theano

Christopher Bourez

Book details
Book preview
Table of contents
Citations

About This Book

Develop deep neural networks in Theano with practical code examples for image classification, machine translation, reinforcement agents, or generative models.About This Book• Learn Theano basics and evaluate your mathematical expressions faster and in an efficient manner• Learn the design patterns of deep neural architectures to build efficient and powerful networks on your datasets• Apply your knowledge to concrete fields such as image classification, object detection, chatbots, machine translation, reinforcement agents, or generative models.Who This Book Is ForThis book is indented to provide a full overview of deep learning. From the beginner in deep learning and artificial intelligence, to the data scientist who wants to become familiar with Theano and its supporting libraries, or have an extended understanding of deep neural nets.Some basic skills in Python programming and computer science will help, as well as skills in elementary algebra and calculus.What You Will Learn• Get familiar with Theano and deep learning• Provide examples in supervised, unsupervised, generative, or reinforcement learning.• Discover the main principles for designing efficient deep learning nets: convolutions, residual connections, and recurrent connections.• Use Theano on real-world computer vision datasets, such as for digit classification and image classification.• Extend the use of Theano to natural language processing tasks, for chatbots or machine translation• Cover artificial intelligence-driven strategies to enable a robot to solve games or learn from an environment• Generate synthetic data that looks real with generative modeling• Become familiar with Lasagne and Keras, two frameworks built on top of TheanoIn DetailThis book offers a complete overview of Deep Learning with Theano, a Python-based library that makes optimizing numerical expressions and deep learning models easy on CPU or GPU.The book provides some practical code examples that help the beginner understand how easy it is to build complex neural networks, while more experimented data scientists will appreciate the reach of the book, addressing supervised and unsupervised learning, generative models, reinforcement learning in the fields of image recognition, natural language processing, or game strategy.The book also discusses image recognition tasks that range from simple digit recognition, image classification, object localization, image segmentation, to image captioning. Natural language processing examples include text generation, chatbots, machine translation, and question answering. The last example deals with generating random data that looks real and solving games such as in the Open-AI gym.At the end, this book sums up the best -performing nets for each task. While early research results were based on deep stacks of neural layers, in particular, convolutional layers, the book presents the principles that improved the efficiency of these architectures, in order to help the reader build new custom nets.Style and approachIt is an easy-to-follow example book that teaches you how to perform fast, efficient computations in Python. Starting with the very basics-NumPy, installing Theano, this book will take you to the smooth journey of implementing Theano for advanced computations for machine learning and deep learning.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Deep Learning with Theano an online PDF/ePUB?
Yes, you can access Deep Learning with Theano by Christopher Bourez in PDF and/or ePUB format, as well as other popular books in Computer Science & Neural Networks. We have over one million books available in our catalogue for you to explore.

Information

Year
2017
ISBN
9781786463050
Edition
1

Deep Learning with Theano


Table of Contents

Deep Learning with Theano
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Customer Feedback
Preface
What this book covers
Why Theano?
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Theano Basics
The need for tensors
Installing and loading Theano
Conda package and environment manager
Installing and running Theano on CPU
GPU drivers and libraries
Installing and running Theano on GPU
Tensors
Graphs and symbolic computing
Operations on tensors
Dimension manipulation operators
Elementwise operators
Reduction operators
Linear algebra operators
Memory and variables
Functions and automatic differentiation
Loops in symbolic computing
Configuration, profiling and debugging
Summary
2. Classifying Handwritten Digits with a Feedforward Network
The MNIST dataset
Structure of a training program
Classification loss function
Single-layer linear model
Cost function and errors
Backpropagation and stochastic gradient descent
Multiple layer model
Convolutions and max layers
Training
Dropout
Inference
Optimization and other update rules
Related articles
Summary
3. Encoding Word into Vector
Encoding and embedding
Dataset
Continuous Bag of Words model
Training the model
Visualizing the learned embeddings
Evaluating embeddings – analogical reasoning
Evaluating embeddings – quantitative analysis
Application of word embeddings
Weight tying
Further reading
Summary
4. Generating Text with a Recurrent Neural Net
Need for RNN
A dataset for natural language
Simple recurrent network
LSTM network
Gated recurrent network
Metrics for natural language performance
Training loss comparison
Example of predictions
Applications of RNN
Related articles
Summary
5. Analyzing Sentiment with a Bidirectional LSTM
Installing and configuring Keras
Programming with Keras
SemEval 2013 dataset
Preprocessing text data
Designing the architecture for the model
Vector representations of words
Sentence representation using bi-LSTM
Outputting probabilities with the softmax classifier
Compiling and training the model
Evaluating the model
Saving and loading the model
Running the example
Further reading
Summary
6. Locating with Spatial Transformer Networks
MNIST CNN model with Lasagne
A localization network
Recurrent neural net applied to images
Unsupervised learning with co-localization
Region-based localization networks
Further reading
Summary
7. Classifying Images with Residual Networks
Natural image datasets
Batch normalization
Global average pooling
Residual connections
Stochastic depth
Dense connections
Multi-GPU
Data augmentation
Further reading
Summary
8. Translating and Explaining with Encoding – decoding Networks
Sequence-to-sequence networks for natural language processing
Seq2seq for translation
Seq2seq for chatbots
Improving efficiency of sequence-to-sequence network
Deconvolutions for images
Multimodal deep learning
Further reading
Summary
9. Selecting Relevant Inputs or Memories with the Mechanism of Attention
Differentiable mechanism of attention
Better translations with attention mechanism
Better annotate images with attention mechanism
Store and retrieve information in Neural Turing Machines
Memory networks
Episodic memory with dynamic memory networks
Further reading
Summary
10. Predicting Times Sequences with Advanced RNN
Dropout for RNN
Deep approaches for RNN
Stacked recurrent networks
Deep transition recurrent network
Highway networks design principle
Recurrent Highway Networks
Further reading
Summary
11. Learning from the Environment with Reinforcement
Reinforcement learning tasks
Simulation environments
Q-learning
Deep Q-network
Training stability
Policy gradients with REINFORCE algorithms
Related articles
Summary
12. Learning Features with Unsupervised Generative Networks
Generative models
Restricted Boltzmann Machines
Deep belief bets
Generative adversarial networks
Improve GANs
Semi-supervised learning
Further reading
Summary
13. Extending Deep Learning with Theano
Theano Op in Python for CPU
Theano Op in Python for the GPU
Theano Op in C for CPU
Theano Op in C for GPU
Coalesced transpose via shared memory, NVIDIA parallel for all
Model conversions
The future of artificial intelligence
Further reading
Summary
Index

Deep Learning with Theano

Copyright © 2017 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author,...

Table of contents