Skip to Content
Mastering Computer Vision with TensorFlow 2.x
book

Mastering Computer Vision with TensorFlow 2.x

by Krishnendu Kar
May 2020
Beginner to intermediate
430 pages
10h 39m
English
Packt Publishing
Content preview from Mastering Computer Vision with TensorFlow 2.x

Setting up model parameters

For our analysis, we set the model parameters as shown in the following block of code:

NUM_EPOCHS = 5batchsize = 10num_train_images = 900num_val_images = 100

The base model is then constructed similar to our example in the last section, except we do not include the top model by setting include_top=False:

base_model = ResNet50(weights='imagenet',include_top=False,input_shape=(img_height, img_width, 3))

In this code, we used the base model to generate the feature vector by using only convolutional layers.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Computer Vision with TensorFlow 2

Hands-On Computer Vision with TensorFlow 2

Benjamin Planche, Eliot Andres

Publisher Resources

ISBN: 9781838827069Supplemental Content