Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Deep Learning Architectures with Python

You're reading from   Hands-On Deep Learning Architectures with Python Create deep neural networks to solve computational problems using TensorFlow and Keras

Arrow left icon
Product type Paperback
Published in Apr 2019
Publisher Packt
ISBN-13 9781788998086
Length 316 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Saransh Mehta Saransh Mehta
Author Profile Icon Saransh Mehta
Saransh Mehta
Yuxi (Hayden) Liu Yuxi (Hayden) Liu
Author Profile Icon Yuxi (Hayden) Liu
Yuxi (Hayden) Liu
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Section 1: The Elements of Deep Learning
2. Getting Started with Deep Learning FREE CHAPTER 3. Deep Feedforward Networks 4. Restricted Boltzmann Machines and Autoencoders 5. Section 2: Convolutional Neural Networks
6. CNN Architecture 7. Mobile Neural Networks and CNNs 8. Section 3: Sequence Modeling
9. Recurrent Neural Networks 10. Section 4: Generative Adversarial Networks (GANs)
11. Generative Adversarial Networks 12. Section 5: The Future of Deep Learning and Advanced Artificial Intelligence
13. New Trends of Deep Learning 14. Other Books You May Enjoy

MobileNet with Keras

MobileNet was trained on ImageNet data. We can implement MobileNet using the pre-trained weights for the model by using the Keras application class. Inside the Keras application, you can find a lot of pre-trained models for use. You can go through the documentation of the Keras application at https://keras.io/applications/.

So, let's get started! First, obviously, we will import the required dependencies:

import keras
from keras.preprocessing import image
from keras.applications import imagenet_utils
from keras.models import Model
from keras.applications.mobilenet import preprocess_input

import numpy as np
import argparse
import matplotlib.pyplot as plt

The Keras preprocessing provides a class such as the ImageDataGenerator class which helps to draw batches of images from the dataset. Our next job is to fetch the model weights and graph. The download...

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 £16.99/month. Cancel anytime