TensorFlow is a tool for machine learning capable of building deep neural networks with high-level Python code. It provides developer-friendly APIs that help software engineers train, analyze, and deploy ML models.
Upgrade to Fireship PRO at https://fireship.io/pro Use code lORhwXd2 for 25% off your first payment.
🎨 My Editor Settings
- Atom One Dark - vscode-icons - Fira Code Font
🔖 Topics Covered
- What is TensorFlow? - How to build a neural network with TensorFlow - What is TensorFlow used for? - Who created TensorFlow? - How neural networks work - Easy neural network tutorial - What is a mathematical Tensor?
TensorFlow, an open-source machine learning framework famous for powering deep neural
networks with high-level code. It was developed by the Google Brain team and first released in 2015.
It's most commonly used with Python, but can run in other languages like JavaScript, C++, and Java.
At its core, it's just a library for programming with linear algebra and statistics. As you know,
the word tensor describes a multilinear relationship between sets of algebraic
objects within a vector space, aka a multidimensional array. What makes it
special is its collection of APIs for data processing, visualization, model evaluation,
and deployment that make deep learning accessible to the average developer.
It's extremely portable and is able to run on tiny mobile CPUs or microcontrollers with
TensorFlow Lite, can run in the browser with TensorFlow.js, while the core library can scale
up to multiple GPUs or run on tensor processing units, chips engineered specifically to run
TensorFlow at a massive scale. It's used in medicine for object detection and MRI images,
by Twitter to sort your timeline by tweet relevance, by Spotify to recommend music,
by PayPal for fraud detection, in addition to many other applications like self-driving cars,
natural language processing, and so on. To build your own neural network right now,
create a Python file and install TensorFlow. Next, we'll need some data, like Bash and MNIST,
which we can automatically import. The goal is to train a model that can predict the clothing
type of each image. TensorFlow has a subclassing API for expert users, but also integrates with
a beginner-friendly Keras library, which has a sequential API that can easily build neural
networks layer by layer. We start with a flattened layer that takes the 28 by 28 pixel image as an
input and converts it into a one-dimensional array. This input layer is then fed into a dense layer
with 128 fully connected neurons or nodes. You can think of each node like its own linear
regression. As each data point flows through it, it'll try to guess the output and gradually update
a mapping of weights to determine the importance of a given variable. In this case, it uses a
rectified linear activation function that will output the input if a certain threshold is met,
otherwise it will just output zero. And the behavior of this layer can be customized by
tuning its hyperparameters. Finally, we have our output layer, which is also dense,
but is limited to 10 nodes, which corresponds to the total number of clothing types in the dataset.
Now we can compile the model and tell it to optimize a certain loss function,
like sparse categorical cross-entropy. As we train the model for multiple epochs,
its accuracy should gradually improve. The end result is a model that makes a prediction with
the likelihood that an image is a certain type of clothing. Congratulations, you just
built a neural network. This has been TensorFlow in 100 seconds. Hit the like button if you want
to see more short videos like this. Thanks for watching, and I will see you in the next one.