TL;DR: Google’s open-source TensorFlow library helps developers build computational graphs and contains free additional modules that make AI/ML software development easier for consumer products and mobile apps. Developers require knowledge of Python or C++. This piece covers 3 common modules and possible business applications:
Open-sourced in 2015, TensorFlow is a framework by Google for creating deep learning models. Deep Learning is one of several categories of machine learning (ML) models that use multi-layer neural networks. The TensorFlow library allows users to perform functions by creating a computational graph.
TensorFlow took the world by storm because it is free, (relatively) easy to use and gives developers with entry-level machine learning backgrounds access a powerful library instead of building all their AI models from scratch. TensorFlow and its accompanying modules make ML/AI software development for both mobile apps and backend services easier.
Tensorflow is one of many machine learning libraries (other examples include CNTK and Theano). Machine learning is a field of computer science that gives computers the ability to learn without being explicitly programmed. For example, AlphaGo Zero‘s AI taught itself to play Go and outperformed its predecessor, AlphaGo, which had defeated the world champion in Go. Machine learning is useful for tasks where explicit algorithms don’t yield good results, such as user screening, sorting high context data and clustering for predictions and profiling.
Practical examples include detecting fraud or data breaches, email filtering, optical character recognition (OCR), and ranking.
In the next section, we’ll demystify the computational graph, which is essential for understanding how TensorFlow works in human-speak.
One of the most common terms heard in AI is neural networks. Neural networks are a type of computational graph. A computational graph is a directed graph where operations or variables can be nodes that feed into each other. Every node in the graph can, therefore, define a function of the variables. Most deep learning models, AI, and neural networks, are just math models. We can use computational graphs to represent and implement different maths models.
If you have some memory of linear algebra and calculus, you should check out this great tutorial called Deep Learning from Scratch.
TensorFlow was created with processing power limitations in mind (check TensorFlow Lite and TensorFlow Mobile), making it easier for mobile and web developers to make use of the library and create AI-powered features for consumer products. Developers with a basic background in neural networks can use the framework for data sets, estimators, training and inference.
Developers with no background in neural networks may want to start with a higher-level neural network API, such as Keras.io. Written in Python, Keras is capable of running on top of TensorFlow, CNTK, and Theano and is good for easy and fast prototyping.
To start with TensorFlow, a developer needs to know:
The many modules included in the TensorFlow librarycan perform a variety of functions known as AI/ML. Below are three commonly used modules:
Below, we’ll list out some examples for commercial and consumer applications:
One of the many applications for CNNs is to help machines recognize images and make them meaningful in a way that is intuitive to humans. For example, this means having a computer recognizing the coloured dots in an image combine to become a cake. In order to check accuracy, an AI can be trained on a training data where correct answers are already available. The CNN will learn to identify an image, check if it is correct, and improve its ability to make sense of the coloured clusters. But a true performance is giving AI a new dataset to see how it performs.
Transfer learning is a shortcut technique that takes a fully-trained AI model and repurpose it for new image classification rather than retraining an AI model from scratch every time. ImageNet is a good resource for providing an image training data set.
CNN can be applied in a range of fields such as:
The benefits of starting early with AI/ML is that early adopters will have larger datasets to work with than competitors years from now.
Sequence-to-Sequence (Seq2Seq) models use recurrent neural networks as a building block by feeding lots of sentence pairs during model training so that we can generate one sentence from another sentence. These sentence pairs can be anything. For example, when it is words from two different languages, the model can be used for translations. When it is a pair of conversational messages, the model can be used for chat bots.
One interesting point is that we just need to feed in a raw word sequence and we can get back a word sequence output with mostly correct grammar (not perfect, but at least understandable). This means that seq2seq models can learn the language model from the training sample and implicitly learn it during training, which usually is not the case in traditional NLP where the language model needs to be explicitly taught.
Language modeling (in short, the probability a word is going to appear given previous sequence of words) is key to many interesting problems such as:
Large-scale linear models are more simple than complex neural networks with many layers. But going on the principle of using the right tool for the right job, linear models are still powerful when applied for the appropriate cases. Compared to deep neural nets, linear models train more quickly, can work well on large feature sets, and be interpreted and debugged more easily. As a general approach, linear models are effective for data crunching and making simple predictions to help businesses with large datasets.
Linear models can be used for binary classification (predicting a or b outcome), multiclass classification (predicting one of multiple outcomes) and regression (predicting a numeric value). These models can be used for evaluating big data, such as census data or financial data.
As an example, Amazon ML uses linear models in ecommerce to help make suggestions for sellers such as:
Of course, we’ve just scraped the surface of what AI/ML can do. If you would like to learn more about how AI-powered features can be incorporated into your product, get in touch.