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

Model optimization

Model optimization, also known as quantization, can be performed with post-training quantization to improve CPU/GPU performance, without sacrificing accuracy. The optimization process can be performed using the following:

  • Floating point to 8-bit precision (optimize for size)
  • Full integer quantization using integer input and output for a microcontroller
  • A bit of both dynamically quantize with 8 bits but any outputs are stored in floating point form
  • Pruning is another dynamic optimization method to eliminate the low value weights from the neural network during training. It can be initiated by following lines of code:
from tensorflow_model_optimization.sparsity import keras as sparsitypruning_params = { 'pruning_schedule': ...
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