Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hands-On Neural Networks with Keras

You're reading from  Hands-On Neural Networks with Keras

Product type Book
Published in Mar 2019
Publisher Packt
ISBN-13 9781789536089
Pages 462 pages
Edition 1st Edition
Languages
Author (1):
Niloy Purkait Niloy Purkait
Profile icon Niloy Purkait

Table of Contents (16) Chapters

Preface Section 1: Fundamentals of Neural Networks
Overview of Neural Networks A Deeper Dive into Neural Networks Signal Processing - Data Analysis with Neural Networks Section 2: Advanced Neural Network Architectures
Convolutional Neural Networks Recurrent Neural Networks Long Short-Term Memory Networks Reinforcement Learning with Deep Q-Networks Section 3: Hybrid Model Architecture
Autoencoders Generative Networks Section 4: Road Ahead
Contemplating Present and Future Developments Other Books You May Enjoy

Vectorizing labels

We can also vectorize our training labels, which simply helps our network handle our data better. You can think of vectorization as an efficient way to represent information to computers. Just like humans are not very good at performing computations using Roman numerals, computers are notoriously worse off when dealing with unvectorized data. In the following code, we are transforming our labels into NumPy arrays that contain 32-bit floating-point arithmetic values of either 0.0 or 1.0:

y_train= np.asarray(y_train).astype('float32')
y_test = np.asarray(y_test).astype('float32')

Finally, we have our tensor, ready to be consumed by a neural network. This 2D tensor is essentially 25,000 stacked vectors, each with its own label. All that is left to do is build our network.

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 $15.99/month. Cancel anytime}