Deploying Models on Mobile and Cloud Platforms

In this chapter, we'll discuss deploying machine learning models on mobile devices running on both the Android operating system and the Google Cloud Platform (GCP).

Using C++ on mobile devices allows us to make programs faster and more compact. We can utilize as many computational resources as possible because modern compilers can optimize the program concerning the target CPU architecture. C++ doesn't use an additional garbage collector for memory management, which can have a significant impact on program performance. Program size can be reduced because C++ doesn't use an additional VM and is compiled directly to machine code. These facts make C++ the right choice for mobile devices with a limited amount of resources and can be used to solve heavy computational tasks.

Using C++ to implement machine learning models that are used for the cloud can provide other benefits. As we mentioned previously, you can increase application performance by compiling a program for your specific architecture; usually, this plays a significant role in the data preprocessing step. The starting time is also much shorter for a native application than for interpretable programs. This fact can make your application more responsive if you're using cloud machines that are only launched by client requests. These types of machines are used for reducing the cloud service's cost.

The following topics will be covered in this chapter:

  • Image classification on Android mobile
  • Machine learning in the cloud using Google Compute Engine
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.97.170