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

Compiling and training the model

Next, we compile the model and start training. The compile option specifies three parameters:

  • Optimizer: The optimizers we can use are adam, rmsprop, sgd, adadelta, adagrad, adamax, and nadam. For a list of Keras optimizers, please refer to https://keras.io/optimizers:
    • sgd stands for Stochastic gradient descent. As the name suggests, it uses the gradient value for the optimizer.
    • adam stands for adaptive moment. It uses the gradient in the last step to adjust the gradient descent parameter. Adam works well and needs very little tuning. It will be used often throughout this book.
    • adagrad works well for sparse data and also needs very little tuning. For adagrad, a default learning rate is not required.
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