Table of contents
- 0.1 What is a Tensor?
- 0.2 What is TensorFlow?
- 0.3 How many models can I train with TensorFlow?
- 0.4 How do I use TensorFlow with my computer or mobile device?
- 0.5 How do we specify the inputs and outputs of the model?
- 0.6 What is the TensorFlow model?
- 0.7 What is a computational graph?
- 0.8 Can you use a pre-trained model
- 0.9 How does TensorFlow work?
- 0.10 What resources can I use to learn?
- 0.11 Conclusion
- 1 Don’t miss amazing tips!
TensorFlow is a scalable machine learning framework that can be used for training neural networks, regression and classification models. It has also been deployed for research into Vision and Speech tasks, as well as Natural Language Processing tasks. Let’s have a look at the basics for Tensorflow, we will look at basic terms and definitions in order to have an overview of machine learning.
What is a Tensor?
A Tensor is a mathematical object in the form of an n dimensional array. It is widely used in other areas like Machine Learning, which makes it an extremely useful tool for us in these areas. The basic operations that we can perform on the Tensor are addition, subtraction, multiplication, and division.
The elements of our Tensor will represent some data or information ranging from 0-1 or real numbers. This information can be anything – from images, to text etc.
What is TensorFlow?
- A scalable machine learning framework that can be used for neural networks and other machine learning problems.
- Used by Google to provide the open source engine behind some of their most important projects such as AlphaGo Zero in order to better train their AI systems.
TensorFlow, a high-level library that allows users to develop and deploy performing machine learning models, was released in 2015. It has since become the de facto framework for machine learning practitioners as well as a research tool for academic institutions and companies.
- How many models can I train with TensorFlow?
- How do I use TensorFlow with my computer or mobile device?
- How do we specify the inputs and outputs of the model?
How many models can I train with TensorFlow?
If a single machine can run the model and evaluate the results, then a “single model” would be enough to answer the question / perform the task.
If a model needs to be scaled out and not just locally, then “multiple models” (or thousands in some cases) may be required for the task at hand.
How do I use TensorFlow with my computer or mobile device?
Usually, we don’t want to actually run the models because running a model on every CPU can be very computationally intensive. So we would like to deploy models on a server and let them run in the cloud. That is how TensorFlow can scale out multiple models.
There is also a set of tools for mobile devices, allowing you to run Tensorflow on your smartphone or tablet.
How do we specify the inputs and outputs of the model?
We want to define the inputs and outputs of our model using four pieces of information:
- The size of each input (or label) attribute. These are also known as feature dimensions and can also be called as “features” or “featuresets”.
- The shape of each input/label feature at each location.
- The type of the input/label feature. These are also known as scalars or integers.
- The shape of the output values. We usually have tensors that have dimensionality, with each value having shape from a single list of tensors (which can be tensors themselves).
What is the TensorFlow model?
- It’s a data flow graph (DFG) which describes how inputs and outputs between different nodes are being computed by our neural network model.
- It’s a graph in which both input and output data is flowing from one node to another in order to compute the gradients that will be used for training the network.
What is a computational graph?
- A computational graph, sometimes referred to as a dataflow graph (DFG), is an abstract representation of a computation. It consists of vertices or nodes connected by edges (also called arcs).
- Nodes represent computation and edges represent the flow of data between nodes.
Can you use a pre-trained model
- Yes. TensorFlow has many models, including the ResNet-50 model for image recognition, available for you to use out of the box. Here are other models you can have a look at.
- A pre-trained model should be “trained” by a system and then “deployed” so that it can be used.
- Usually, we don’t want to actually run the models because running a model on every CPU can be very computationally intensive. So we would like to deploy models on a server and let them run in the cloud. That is how TensorFlow can scale out multiple models.
How does TensorFlow work?
- TensorFlow can run in two different modes: “local” and “remote”. In local mode, we have a single machine that is running both the backend (i.e. the engine that is actually running / executing the model) and the frontend (i.e. the user code). Before we use TensorFlow in a remote mode, we need to first deploy it on our servers in order to train our models and then deploy them wherever we want them to be executed (which could be on other servers or devices).
What resources can I use to learn?
- Youtube Tensorflow JS introduction
- Official TensorFlow learn website
- Introduction to Tensorflow on Coursera (Beginner – Intermediate)
- Coursera linear algebra (Intermediate – Advanced)
Machine learning and AI have become increasingly more important in our everyday lives. We can now rely on Artificial Intelligence to help us with a variety of tasks, from improving our internet search results to understanding what is happening in our images, videos and text.
We need to embrace the latest advancements in this field in order to develop new business models, services and tools which will help us improve our quality of life.
Interesting read how quickly will AI replace software programmers in future.