Keras
keras
#keras
Table of Contents
About
1
Chapter 1: Getting started with keras
2
Remarks
2
Examples
2
Installation and Setup
2
Installation
2
Configuration
3
Switching from TensorFlow to Theano
4
Getting Started with Keras : 30 Second
4
Chapter 2: Classifying Spatiotemporal Inputs with CNNs, RNNs, and MLPs
6
Introduction
6
Remarks
6
Examples
6
VGG-16 CNN and LSTM for Video Classification
Chapter 3: Create a simple Sequential Model
6
8
Introduction
8
Examples
8
Simple Multi Layer Perceptron wtih Sequential Models
8
Chapter 4: Custom loss function and metrics in Keras
9
Introduction
9
Remarks
9
Examples
9
Euclidean distance loss
Chapter 5: Dealing with large training datasets using Keras fit_generator, Python generato
9
10
Introduction
10
Remarks
10
Examples
10
Training a model to classify videos
Chapter 6: Transfer Learning and Fine Tuning using Keras
10
13
Introduction
13
Examples
13
Transfer Learning using Keras and VGG
13
Loading pre-trained weights
13
Create a new network with bottom layers taken from VGG
14
Remove multiple layers and insert a new one in the middle
14
Credits
16
About
You can share this PDF with anyone you feel could benefit from it, downloaded the latest version
from: keras
It is an unofficial and free keras ebook created for educational purposes. All the content is
extracted from Stack Overflow Documentation, which is written by many hardworking individuals at
Stack Overflow. It is neither affiliated with Stack Overflow nor official keras.
The content is released under Creative Commons BY-SA, and the list of contributors to each
chapter are provided in the credits section at the end of this book. Images may be copyright of
their respective owners unless otherwise specified. All trademarks and registered trademarks are
the property of their respective company owners.
Use the content presented in this book at your own risk; it is not guaranteed to be correct nor
accurate, please send your feedback and corrections to info@
1
Chapter 1: Getting started with keras
Remarks
Guiding principles
? Modularity
A model is understood as a sequence or a graph of standalone, fully-configurable modules that
can be plugged together with as little restrictions as possible. In particular, neural layers, cost
functions, optimizers, initialization schemes, activation functions, regularization schemes are all
standalone modules that you can combine to create new models.
? Minimalism
Each module should be kept short and simple. Every piece of code should be transparent upon
first reading. No black magic: it hurts iteration speed and ability to innovate.
? Easy extensibility
New modules are dead simple to add (as new classes and functions), and existing modules
provide ample examples. To be able to easily create new modules allows for total expressiveness,
making Keras suitable for advanced research.
? Work with Python
No separate models configuration files in a declarative format. Models are described in Python
code, which is compact, easier to debug, and allows for ease of extensibility.
Examples
Installation and Setup
Keras is a high-level neural networks library, written in Python and capable of running on top of
either TensorFlow or Theano. It was developed with a focus on enabling fast experimentation.
Being able to go from idea to result with the least possible delay is key to doing good research.
Use Keras if you need a deep learning library that:
? Allows for easy and fast prototyping (through total modularity, minimalism, and extensibility).
? Supports both convolutional networks and recurrent networks, as well as combinations of the
two.
? Supports arbitrary connectivity schemes (including multi-input and multi-output training).
? Runs seamlessly on CPU and GPU.
2
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.