Packt’s Video Learning Paths are a series of individual video products put together in a logical and stepwise manner such that each video builds on the skills learned in the video before it.
It can be hard to get started with machine learning, particularly as new frameworks like TensorFlow start to gain traction across enterprise companies. TensorFlow is an open source software library for numerical computation using data flow graphs. The flexible architecture allows you to deploy computation to one or more CPUs or GPUs in a desktop, server, or mobile device with a single API.
This Learning Path begins by covering a mastery on Python with a deep focus on unlocking Python’s secrets. We then move on to understand deep learning as implemented by Python and TensorFlow. Finally, we solve common commercial machine learning problems using TensorFlow.
If you have no prior exposure to one of the most important trends impacting how we do data science in the next few years, this Learning Path will help you get up to speed.
The goal of this Learning Path is to help you understand deep learning and machine learning by getting to know Python first and then TensorFlow.
This Learning Path is authored by some of the best in their fields.
About the Authors
Daniel Arbuckle got his Ph.D. In Computer Science from the University of Southern California. He has published numerous papers, along with several books and video courses, and is both a teacher of computer science and a professional programmer.
Eder Santana is a Ph.D. candidate in Electrical and Computer Engineering. After working for 3 years with kernel machines (SVMs, Information Theoretic Learning, and so on), Eder moved to the field of deep learning 2.5 years ago, when he started learning Theano, Caffe, and other machine learning frameworks. Now, Eder contributes to Keras, the deep learning library for Python. Besides deep learning, he also likes data visualization and teaches machine learning, either on online forums or as a teacher assistant.
Dan Van Boxel
Dan Van Boxel is a data scientist and machine learning engineer with over 10 years of experience. He is well-known for "Dan Does Data", a YouTube livestream demonstrating the power and pitfalls of neural networks. He has developed and applied novel statistical models of machine learning to topics such as accounting for truck traffic on highways, travel time outlier detection, and other areas. Dan has also published research and presented findings at the Transportation Research Board and other academic journals.
Shams Ul Azeem
Shams Ul Azeem is an undergraduate student of NUST Islamabad, Pakistan, in Electrical Engineering. He’s pursuing his career in machine learning, particularly in deep learning, by doing medical-related freelance projects with different companies.
The goal of this video is to provide a basic understanding of the Python language constructs.
The goal of this video is to ensure we have the basic ability to operate with Python's most common data structures.
People used to lower-level languages are unfamiliar with First-class functions and classes; we'll take a look at them in this video.
Python comes with a lot of tools. We need to be familiar with them in order to make the best use of the language. That's the topic we will be covering in this video.
The goal of this video is to look at the overview of recent language changes in Python.
In this video, we are going to download and install the correct version of Python and make sure it's functional.
The fastest way to get rolling is to use a textual interface, so we need to make sure we know how to use it. That's the goal in this video
Python has good support for installing and managing third-party code packages; let's take a look at them in this video.
There's a lot of good code available. How do we find it? Let's take a look in this video.
The goal of this video is to know how to create the structure of a Python program.
A package containing no code isn't of much use. How do we make it do something? Let's take a look at it in this video.
The goal in this video is to understand how we can make code in separate modules of the package interact.
A complete program usually involves static data files along with the code. How do we integrate non-python files in a package? Let's find out!
The computer can read our code as long as the syntax is correct, but humans require more care. Let's see how we can write readable code in Python.
If more than one programmer is working on a project, version control is a necessity. Even for a single programmer, version control is useful. We will take a look at it in this video.
In this video, we will see how writing a program can take a while, and it's best that external changes to the development system do not impact the process.
Properly formatted docstrings can be automatically used by IDEs and transformed into HTML. Let's take a peek into it in this video.
The goal of this video is to understand why it's important that examples in the documentation stay consistent with the code.
Writing Python code packages is all well and good, but how to we make a program? We will take a look at it in this video.
It's useful to be able to read data from the program command line. The argparse package makes it easy. Let's see it in action in this video.
What do we do when we need information to flow both ways with the user?
Running other programs from within a program is often useful, especially, for system automation. We'll look at how to do it.
It's often useful to have a launcher file for a program, which can be double-clicked in a GUI or used a shorthand from the command line. A simple script or batch file does the trick, let's see how.
Parallel processing has pitfalls, but Python's high-level parallel processing framework makes it easy to dodge them. Let's look at it in this video.
When our program doesn't fit the conceptual model of concurrent.futures, we can use multiprocessing to define our own model. Let's see how.
At first glance, Python's coroutine scheduling looks a lot like multiprocessing or multithreading. What's the difference? Let's get to know this better.
The goal of this video is to set up and run the asyncio asyncio coroutine scheduler
In this video we will see how do we actually use asyncio's Future objects.
The goal of this video is to understand how to keep coroutines from jamming each other up and locking the program.
In this video, we will see how do asyncio's actual I/O facilities work
Functions are very useful, but it would be nice to be able to tweak them to suit our specific needs. Enter function decorators.
If we're going to be using functions as data, it would be nice to have metadata for the functions too. Function annotations give us that.
Class objects are basically data structures, so it would be useful to be able to rewrite them as they're defined. Class decorators let us do that.
Class decorators take effect after Python has created a class object. If we want our code involved before the class object is created, we need to use a metaclass.
Pieces of code often come in matched pairs, with one piece needing to run before something happens and the matching piece after. Context managers make sure the pieces match up.
We can plug code into Python's attribute access mechanism to control what it means to read, write, or delete a member variable.
Testing is critical, but it can feel like a burden. Automated unit testing and test-driven development can solve this problem.
The unittest package provides a framework for writing automatic tests; let's check it out.
We need to separate the code we're testing from everything else. When the code interacts with other objects, we can replace them with mock objects. Let's see how.
As a test suite grows, running the tests individually becomes impractical. We need the system to find and run them in large swaths.
Sometimes we want a more flexible test runner than the one built in to unittest. Nose to the rescue.
For the newcomer, it can be difficult to figure out exactly what other people are talking about when they say "reactive programming".
Many of the discussions of reactive programming are highly theoretical. Building a reactive programming system for ourselves will help show how simple the basic ideas are.
Creating a complete and correct reactive programming framework takes a lot of time and effort. Since somebody's already done it, let's take a look at the result.
We need our web server to scale up and maintain high availability. Let's see how we can do that.
Sometimes, we'd rather have all of the protocol-level stuff handled automatically for our microservice.
Sometimes we need to access or create compiled code and sometimes we don't need it as much as we think. How do we know which is which?
There's a lot of useful code out that wasn't written for Python, but most of it is accessible to C code.
Sometimes we just need to write a code that runs close to the metal. Cython gives us that option.
What is Deep Learning, and when is it the way to go?
How to avoid programming Deep Learning from scratch? Let’s take a look at it in this video.
How to get our first deep neural network trained?
How can we avoid making a differentiation of functions and make backpropagation easier?
How do Keras and other libraries use Theano work behind the scenes?
How does Keras work? How does one write a basic, fully connected neural network layer in Keras?
Understand what convolutional neural networks are and how to use them. How can we write convolutional layers with Python?
How can we solve complex image datasets (for example, cats versus dogs) without training a full model from scratch?
How does Keras work?
We will solve complete image datasets with pretrained models: classifying cats versus dogs.
How can one define neural network layers with internal states?
Recurrent or convolutional: How can one know which layer they should use?
How can we classify sentiments from text?
How can we automatically describe an image in English?
What is TensorFlow?
TensorFlow is a new machine library that is probably not installed on our operating system by default. This video will guide you through installing TensorFlow locally or remotely.
Before we can use TensorFlow for deep learning, we need to understand how TensorFlow handles basic objects and operations. This video will walk you through a few computations.
Learning any library from documentation can be challenging, so we're going to build a practical machine learning classifier with TensorFlow. We'll start with a simple logistic regression classifier and build up from there.
Though we have a classifier, we need to compute weights so that our model is accurate. For this, we can use TensorFlow to specify and optimize a loss function. TensorFlow will then use this to find good weights.
Using single pixels as features limits us to model essentially linear phenomena. To model non-linear things such as font styles involving several pixels, we will use neural networks to transform our inputs into non-linear combinations for use in a logistic regression classifier.
Now that we understand neural networks, we can see how TensorFlow makes them easy to implement and train.
Now that we've trained a neural network, we should inspect it closely to understand the accuracy and weights.
A single hidden layer is good, but you may find the number of neurons growing prohibitive in order to model very complex features. To combine features more easily, we expand the network in depth rather than width. It's true deep learning with multiple hidden layers.
With our deep neural net trained, we should take time to check its accuracy and understand the features it's extracting.
Particularly in images, the features that we want to find can occur anywhere among the pixels. Convolutional neural nets allow us to train one set of weights to search small windows of an image for a feature.
Understanding the theory of convolutional layers is useless without learning the tools to actually use them. This video walks through a simple example with TensorFlow.
Convolutions can find a feature anywhere in an image, but with all the overlap, we need to make sure we don't find the same feature in the same place multiple times. A pooling layer reduces the size of our input, taking only relevant information.
Having learned how Max Pooling works in theory, it's time to put it into practice by adding it to our simple example in TensorFlow.
We've learned about convolutional layers and used them in an example, but now let's use them for real by adding a convolutional layer to the font classification model.
Convolutional layers often work well when chained together. Let's add another to our font classification model.
After our deep model has trained for a model, it's time to see how well it performs.
Some problems have time-based inputs. Features from the recent past might matter to the current prediction. To address these, researchers have developed recurrent neural networks. TensorFlow natively supports these.
TensorFlow models can be cumbersome to specify, yet follow a common pattern. skflow provides a simple interface for typical models.
RNNs can be hard to specify, but skflow will let us quickly build a model.
After learning so many methods and building all these models, it's helpful to look back and see how far we've come.
TensorFlow is changing very quickly and is being adopted by more researchers and professionals. But at its core are the contributions submitted by new users.
Get the user excited about ML; a quick view of various platforms and key products using the ML tools (photo search, Siri, and so on).
We will install the TensorFlow platform and associated prerequisites on the Mac OS X operating system.
Since TensorFlow does not function natively on Windows, we will cover Virtual Machine setup so Windows users can run Linux on a VM.
We will cover TensorFlow installation on Linux. This also covers installation on Windows via a Virtual Machine running Linux.
Which dataset do we use for our first classifier, and what attributes do we consider? Let's use a dataset of letters in numerous typefaces.
We just spent a good amount of time obtaining and preparing data, are we expected to do this for each run? No, you'll now learn to automate the initial steps used to feed the machine learning process.
How do we represent images internally within the machine learning environment? We'll hold image data in a stack of matrices.
So now that we have looked upon the major concepts, the question remains how do we actually train the classifier in code? We are now going to code and train a classifier using TensorFlow.
Once training is complete, how are the results interpreted and measured? We'll use the training set, with known labels to measure how well our trained system performs.
How do we monitor the internals of our training setup and execution? We'll use TensorBoard to view our network architecture and probe values through the training.
How do we monitor the scalars and tensors on TensorBoard? We'll set up code for log specific variables and TensorBoard reads these structured logs.
How do we view the network architecture we've built for our training? We'll push the graph to a TensorBoard readable log and view it on Graph Explorer.
How do we actually apply what you've just learned to our own project? You'll learn to go through individual changes to our previous project.
How do we process images with more complex and better suited neural networks? For this purpose, we will use the well-known convolutional neural networks also known as CNNs.
How do CNNs work and what does their model look like? We are going to talk about the basic model architecture of CNN.
How to implement a basic CNN? We will look into the coding of a CNN.
How does it look after coding? We will visualize the implemented CNN in TensorFlow.
How much better CNNs are as compared to normal fully connected networks? We will compare the performances of the two models on CIFAR-10 dataset.
Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.
With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.
From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.
Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.