Optimizing the transformed model

The truly final step, and a crucial one, especially when running a complicated frozen and transformed model such as the one we have trained on an older iOS device, is to use another tool called convert_graphdef_memmapped_format, located at tensorflow/contrib/util, to convert the frozen and transformed model to a memmapped format. A memmapped file allows modern operating systems such as iOS and Android to map the file to the main memory directly, so there's no need to allocate the memory for the file and no writing back to disk as the file data is read-only, a significant performance increase.

More importantly, the memmapped file doesn't get treated as memory usage by iOS so, when there's too much memory pressure, ...

Get Intelligent Mobile Projects with TensorFlow now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.