In this post, we are about to accomplish something less common: building and installing TensorFlow with CPU support-only on Ubuntu server / desktop / laptop. We are targeting machines with older CPU, as for example those without Advanced Vector Extensions (AVX) support. This kind of setup can be a choice when we are not using TensorFlow to build a new AI model but instead only for obtaining the prediction (inference) served by a trained AI model. Compared with model training, the model inference is less computational intensive. Hence, instead of performing the computation using GPU acceleration, the task can be simply handled by CPU.
tl;dr The WHL file from TensorFlow CPU build is available for download from this Github repository.
Since we will build TensorFlow with CPU support only, the physical server will not need to be equipped with additional graphics card(s) to be mounted on the PCI slot(s). This is different with the case when we build TensorFlow with GPU support. For such case, we need to have at least one external (non built-in) graphics card that supports CUDA. Naturally, running TensorFlow with CPU pertains to be an economical approach to deep learning. Then how about the performance? Some benchmark results have shown that GPU performs better than CPU when performing deep learning tasks, especially for model training. However, this does not mean that TensorFlow CPU cannot be a feasible option. With proper CPU optimization, TensorFlow can exhibit improved performance that is comparable to its GPU counterpart. When cost is a more serious issue, let’s say we can only do the model training and inference in the cloud, leaning towards TensorFlow CPU can be a decision that also makes more sense from financial standpoint. Continue reading
In the previous posts, we’ve walked through the installations and configurations for various components and libraries required for doing deep learning / artificial intelligence on a Ubuntu 16.04 box. The next step is to be productive, crunching codes and solving problems by applying various algorithms. At this stage, visits to StackOverflow, Github or other similar sites become more frequent. And here is when the problem may arise. Not all codes or snippets copied and pasted from such online references can immediately work. One of the reasons is that the code was indeed written for same software, library, or tool but at different version.
Interestingly, software components for machine learning present different way to obtain the versions. These variations can sometimes result in additional time spent to query “ubuntu get xyz version” on the search engine. This is okay for one component, but when the system becomes complex enough (for example machine learning meets big data for ETL), this can turn into a productivity killer due to unjustifiable time taken for navigating the search engine.
Why not build a list for that?
This post summarizes the shell commands used for obtaining the versions of machine learning-related software and libraries. Commands are embodied in categories that reflect the logical / functional unit the software component belongs to. Continue reading
One important element of deep learning and machine learning at large is dataset. A good dataset will contribute to a model with good precision and recall. In the realm of object detection in images or motion pictures, there are some household names commonly used and referenced by researchers and practitioners. The names in the list include Pascal, ImageNet, SUN, and COCO. In this post, we will briefly discuss about COCO dataset, especially on its distinct feature and labeled objects.
tl;dr The COCO dataset labels from the original paper and the released versions in 2014 and 2017 can be viewed and downloaded from this repository. Continue reading