Reader small image

You're reading from  TensorFlow 2.0 Quick Start Guide

Product typeBook
Published inMar 2019
Reading LevelBeginner
PublisherPackt
ISBN-139781789530759
Edition1st Edition
Languages
Right arrow
Author (1)
Tony Holdroyd
Tony Holdroyd
author image
Tony Holdroyd

Tony Holdroyd's first degree, from Durham University, was in maths and physics. He also has technical qualifications, including MCSD, MCSD.net, and SCJP. He holds an MSc in computer science from London University. He was a senior lecturer in computer science and maths in further education, designing and delivering programming courses in many languages, including C, C+, Java, C#, and SQL. His passion for neural networks stems from research he did for his MSc thesis. He has developed numerous machine learning, neural network, and deep learning applications, and has advised in the media industry on deep learning as applied to image and music processing. Tony lives in Gravesend, Kent, UK, with his wife, Sue McCreeth, who is a renowned musician.
Read more about Tony Holdroyd

Right arrow

The Keras backend

Due to its model-level library structure, Keras may have different tensor manipulation engines that handle low-level operations, such as convolutions, tensor products, and the like. These engines are called backends. Other backends are available; we will not consider them here.

The same https://keras.io/backend/ link takes you to a wealth of keras.backend functions.

The canonical way to use the Keras backend is with the following:

from keras import backend as K

For example, here is the signature of a useful function:

K.constant(value, dtype=None, shape=None, name=None)

Here value is the value to be given to the constant, dtype is the type of the tensor that is created, shape is the shape of the tensor that is created, and name is an optional name.

An instantiation of this is as follows:

from tensorflow.keras import backend as K
const = K.constant([[42,24],[11...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
TensorFlow 2.0 Quick Start Guide
Published in: Mar 2019Publisher: PacktISBN-13: 9781789530759

Author (1)

author image
Tony Holdroyd

Tony Holdroyd's first degree, from Durham University, was in maths and physics. He also has technical qualifications, including MCSD, MCSD.net, and SCJP. He holds an MSc in computer science from London University. He was a senior lecturer in computer science and maths in further education, designing and delivering programming courses in many languages, including C, C+, Java, C#, and SQL. His passion for neural networks stems from research he did for his MSc thesis. He has developed numerous machine learning, neural network, and deep learning applications, and has advised in the media industry on deep learning as applied to image and music processing. Tony lives in Gravesend, Kent, UK, with his wife, Sue McCreeth, who is a renowned musician.
Read more about Tony Holdroyd