8 Mobile convolutional neural networks

 

This chapter covers

  • Understanding the design principles and unique requirements for mobile convolutional networks
  • Examining the design patterns for MobileNet v1 and v2, SqueezeNet, and ShuffleNet
  • Coding examples of these models by using the procedural design pattern
  • Making models more compact by quantizing models and then executing them using TensorFlow Lite (TF Lite)

You have now learned several key design patterns for large models without memory constraints. Now let’s turn to design patterns such as the popular FaceApp from Facebook that are optimized for memory-constrained devices, such as mobile phones and IoT devices.

In contrast to their PC or cloud equivalents, compact models have a special challenge: they need to operate in substantially less memory, and therefore cannot benefit from the use of overcapacity to achieve high accuracy. To fit into these constrained memory sizes, models need to have substantially fewer parameters for inference or prediction. The architecture for compact models relies on a tradeoff between accuracy and latency. The more of the device’s memory the model occupies, the higher the accuracy, but the longer the response time latency.

8.1 MobileNet v1

8.1.1 Architecture

8.1.2 Width multiplier

8.1.3 Resolution multiplier

8.1.4 Stem

8.1.5 Learner

8.1.6 Classifier

8.2 MobileNet v2

8.2.1 Architecture

8.2.2 Stem

8.2.3 Learner

8.2.4 Classifier

8.3 SqueezeNet

8.3.1 Architecture

8.3.2 Stem