Handcrafting a sufficiently large set of explicit rules for manipulating knowledge and making decisions
Dominant paradigm in AI from 1950s to 1980s
symbolic AI relies on hard-coding knowledge and rules
Rules and Data -> Classical Programming -> Answers
Artificial Intelligence
The effort to automate intellectual tasks normally performed by humans.
Machine Learning
Could a computer go beyond “what a programmer knows how to program it to perform” and learn on its own how to perform a specific task?
The answer is by learning from examples in the data.
Data and answers -> Machine Learning -> Rules
process of automating the discovery of rules for solving complex problems.
The workflow of Machine Learning consists of two phases:
Training
Process of machine automatically discovering the rules that convert the data into answers
Training is the process of the machine automatically discovering the rules that convert the data into the answers.
Each pair of input data and the desired answer is called an example.
With the help of the examples, the training process produces the automatically discovered rules.
Inference
Means using the model to obtain answers for new data
Once we have the trained model, we are ready to apply the learned rules on new data, i.e., data that the training process has never seen
Learning representations of data
Machine learning is about learning from data. But what exactly is learned?
a way to effectively transform the data, or in other words, how to change the old representations of the data into a new one that gets us closer to solving the problem at hand.
A representation is a way to look at the data.
Neural Networks
Neural networks are a subfield of machine learning, one in which the transformation of the data representation is done by a system with an architecture loosely inspired by how neurons are connected in human and animal brains
Neural networks are about enabling machines to perform interesting practical tasks by learning from data.
Neural networks are an approach in machine learning wherein the transformation of data representation is performed by successive steps (i.e., layers) of mathematical operations
Deep Learning
Deep learning is the study and application of deep neural networks
deep neural networks are neural networks with many layers (typically, from a dozen to hundreds of layers).
Here, the word “deep” stands for the idea of a large number of successive layers of representations.
How many layers contribute to a model of the data is called the depth of the model
These are the two essential characteristics of how deep learning learns from data:
the incremental, layer-by-layer way in which increasingly complex representations are developed, and the fact that these intermediate incremental representations are learned jointly, each layer being updated to follow both the representational needs of the layer above and the needs of the layer below.
TensorFlow
The name “TensorFlow” was coined to reflect what happens inside a typical program written with the framework: data representations called “tensors” flow through layers and other data-processing nodes, allowing inference and training to happen on machine-learning models.
What is a tensor?
just a computer scientist’s way of saying “multi-dimensional array”
every piece of data and every computation result is represented as a tensor.
For example, a grayscale image can be represented as a 2D array of numbers, i.e., a 2D tensor;
Each tensor has two basic properties:
the data type (e.g., float32, int32)
The shape - Shape describes the size of the tensor along all its dimensions.
For instance, a 2D tensor may have the shape [128, 256] and a 3D tensor may have the shape [10, 20, 128]
Once data is turned into a tensor of given data type and shape, it can be fed into any type of layer that accepts the data type and the shape, regardless of the original meaning of the data.
Tensors are containers that organize our data into structures that can be processed efficiently in parallel.
When we add tensor A with shape [128, 128] to tensor B with shape [128, 128], it is very clear that there are 128 * 128 independent additions that need to take place.
What does the 'flow' mean?
Imagine a tensor is a kind of fluid that carries data.
In TensorFlow, it flows through a graph, i.e., a data structure consisting of interconnected mathematical operations (called nodes)
Each node takes tensors as inputs and produces tensors as outputs.
The “tensor fluid” gets transformed into different shapes and different values as it “flows” through the TensorFlow graph.
This corresponds to the transformation of representations, that is, the crux of what neural networks do,
LEGO analogy
In LEGO, there are only a small number of block types.
LEGO builders don’t need to think about what it takes to make a LEGO block.
This is different from a toy like, say, Play Doh, which is analogous to the low-level API of TensorFlow
Yet the ability to connect LEGO blocks leads to a combinatorially large number of possibilities and virtually infinite power.
It is possible to build a toy house with either LEGO or Play Doh, but unless you have very special requirements on the size, shape, texture or material of the house, it is much easier and faster to build it with LEGO.
Keras
Keras provides a set of the most frequently-used types of neural-network layers, each with configurable parameters.
It also allows users to connect the layers together to form neural networks.
With Keras, users can perform the full deep-learning workflow with very few lines of code.
With the flexibility of the low-level API and the usability of the high-level API, TensorFlow and Keras form an ecosystem that leads the field of deep-learning frameworks in terms of industrial and academic adoption.