TensorFlow is Googleâs library for deep learning, and one of the most popular tools for building and training deep neural networks. In the previous lesson, MiniFlow, students build their own miniature versions of a deep learning library. But for real deep learning work, an industry-standard library like TensorFlow is essential.
Students learn the differences between regression and classification problems. Then they to build a logistic classifier in TensorFlow. Finally, students use fundamental techniques like activation functions, one-hot encoding, and cross-entropy loss to train feedforward networks.
Most of these topics are already familiar to students from the previous âIntroduction to Neural Networksâ and âMiniFlowâ lessons, but implementing them in TensorFlow is a whole new animal. This lesson provides lots of quizzes and solutions demonstrating how to do that.
Towards the end of the lesson, students walk through a quick tutorial on using GPU-enabled AWS EC2 instances to train deep neural networks. Thank you to our friends at AWS Educate for providing free credits to Udacity students to use for training neural networks!
Deep learning has been around for a long time, but it has only really taken off in the last five years because of the ability to use GPUs to dramatically accelerate the training of neural networks. Students who have their own high-performance GPUs are able to experience this acceleration locally. But many students do not own their own GPUs, and AWS EC2 instances are a cloud tool for achieving the same results from anywhere.
The lesson closes with a lab in which students use TensorFlow to perform the classic deep learning exercise of classifying characters: âAâ, âBâ, âCâ and so on.
The Trolley Problem is a favorite conundrum of armchair self-driving car ethicists.
In the original version of the problem, imagine a trolley were running down the rails and about to run over three people tied to the tracks. What if you could throw a switch that would send the trolley down a different track? But what if that track had one person tied down? Would you actually throw the switch to kill one person, even if it meant saving the other three people? Or would you let three people die through inaction?
The self-driving car version of this problem is simpler: what if a self-driving car has to choose between running over a pedestrian, or driving off a cliff and killing the passenger in the vehicle? Whose life is more valuable?
USA Todayâs article, âSelf-driving cars will decide who dies in a crashâ does a reasonable job tackling this issue in-depth, from multiple angles. But the editors didnât do the article any favors with the headline. Itâs not actually self-driving cars that will decide who dies, itâs the humans that design them.
Hereâs Sebastian Thrun, my boss and the former head of the Google Self-Driving Car Project, explaining why this isnât a useful question:
Iâve heard another automotive executive call it âAn impossible problem. You canât make that decision, so how can you expect a car to solve it?â
To be honest, I think of it as an unhelpful problem because we donât have enough data to know at any given point, with what amount of certainty is the car going to kill anybody. Fatal accidents in self-driving cars havenât happened yet in any meaningful numbers, so the necessary data doesnât exist to even work on the problem.
But, I think Iâve come to a conclusion, at least about the hypothetical ethical dilemma:
The car should minimize the number of people who die, by following utilitarian ethics.
This raises some questions about how to value the lives of children versus adults, but I assume some government statistician in the bowels of the Department of Labor has worked that out.
So why should self-driving cars be utilitarian? Because people want them to be.
From USA Today:
Azim Shariff, an assistant professor of psychology and social behavior at the University of California, Irvine, co-authored a study last year that found that while respondents generally agreed that a car should, in the case of an inevitable crash, kill the fewest number of people possible regardless of whether they were passengers or people outside of the car, they were less likely to buy any car âin which they and their family member would be sacrificed for the greater good.â
Iâve seen this in a few places now. The general public thinks cars should be designed to minimize fatalities, even if that means sacrificing the passengers. But they donât want to ride in a car that would sacrifice passengers.
If you believe, as I do, and as Sebastian does, that these scenarios are vanishingly small, then who cares? Give the public what they want. In the exceedingly unlikely scenario that a car has to make this choice, choose the lowest number of fatalities.
And if people donât want to ride in those cars themselves, they can choose not to. They can drive themselves, but of course that is pretty dangerous, too.
The network and the paper in question were clearly designed for autonomous driving, which Apple has been working on, more or less in secret, for years.
The network in questionâââVoxelNetâââhas been trained to perform object detection on lidar point clouds. This isnât a huge leap from object detection on images, which has been a topic of deep learning research for several years, but it is a new frontier in deep learning for autonomous vehicles. Kudos to Apple for publishing their results.
VoxelNet (by Apple), draws heavily on two previous efforts at applying deep learning to lidar point clouds, both by Baidu-affiliated researchers. Since the three papers kind of work as a trio, I did a quick scan of them together.
A team of Tsinghua and Baidu researchers developed Multi-View 3D (MV3D) networks, which combine lidar and camera images in a complex neural network pipeline.
In contrast to Liâs solo work, which constructs voxels out of the lidar point cloud, MV3D simply takes two separate 2D views of the point cloud: one from the front and one from the top (birdsâ eye). MV3D also uses the 2D camera image associated with each lidar scan.
That provides three separate 2D images (lidar front view, lidar top view, camera front view).
MV3D uses each view to create a bounding box in two-dimensions. Birds-eye view lidar created a bounding box parallel to the ground, whereas front-view lidar and camera view each create a 2D bounding box perpendicular to the ground. Combining these 2D bounding boxes creates a 3D bounding box to draw around the vehicle.
At the end of the network, MV3D employs something called âdeep fusionâ to combine output from each of the three neural network pipelines (one associated with each view). Iâll be honestâââI donât really understand how âdeep fusionâ works, so leave me a note in the comments if you can follow what theyâre doing.
The results are a classification of the object and a bounding box around it.
That brings us to VoxelNet, from Apple, which got so much press recently.
VoxelNet has three components, in order:
Feature Learning Network
Convolutional Middle Layers
Region Proposal Network
The Feature Learning Network seems to be the main âcontribution to knowledgeâ, as the scholars say.
It seems that what this network does is start with a semi-random sample of points from within âinterestingâ (my word, not theirs) voxels. This sample of points gets run through a fully-connected (not fully-convolutional) network. This network learns point-wise features which are relevant to the voxel from which the points came.
The network, in fact, uses these point-wise features to develop voxel-wise features that describe each of the âinterestingâ voxels. Iâm oversimplifying wildly, but think of this as learning features that describe each voxel and are relevant to classifying the part of the vehicle that is in that voxel. So a voxel might have features like âblackâ, ârubberâ, and âtreadsâ, and so you could guess that the voxel captures part of a tire. Of course, the real features wonât necessarily be intelligible by humans, but thatâs the idea.
These voxel-wise features can then get pumped through the Convolutional Middle Layers and finally through the Region Proposal Network and, voila, out come bounding boxes and classifications.
One of the most impressive parts of this line of research is just how new it is. The two Baidu papers were both first published online a year ago, and only made it into conferences in the last six months. The Apple paper only just appeared online in the last couple of weeks.
Itâs an exciting time to be building deep neural networks for autonomous vehicles.
Over the last year, a number of companies (including Udacity) have released self-driving car simulators powered by gaming engines.
The latest entrant is Microsoft, which has updated their open-source AirSim flight program to also support self-driving cars.
AirSim looks awesome. The big advantages of building off of a gaming engine (AirSim uses Unreal Engine, whereas the Udacity simulator uses Unity) include fully baked APIs, powerful physics engines, and incredibly realistic design and graphics.
That last item what will ultimately make or brake AirSim, or any other simulation engine.
The holy grail of autonomous vehicle simulation is the ability to train machine learning models in the simulator, and then port them to the real world. Once a simulator breaks that barrier, we should see incredibly fast improvements in our ability to build autonomous driving systems, as itâs exponentially faster to drive âsimulatedâ miles compared ârealâ miles.
As photorealistic as AirSim is, it doesnât yet look to me like itâs realistic enough to reliably move models between AirSims photorealistic environment and the actual, real environment.
That said, I doubt itâs possible to determine model portability with much confidence simply by eyeballing YouTube videos of the simulator, which is all Iâve done so far.
I look forward to people trying out AirSim models in the real world and seeing how they do.
Exploring how to build a Self-Driving Car, step-by-step with Udacity!
Editorâs note: David Silver (Program Lead for Udacityâs Self-Driving Car Engineer Nanodegree program), continues his mission to write a new post for each of the 67 lessons currently in the program. We check in with him today as he introduces us to Lesson 5!
The lesson starts with a fairly basic, feedforward neural network, with just a few layers. Students learn to build the connections between the artificial neurons and implement forward propagation to move calculations through the network.
A feedforward network.
The real mind-bend comes in the âLinear Transformâ concept, where we go from working with individual neurons to working with layers of neurons. Working with layers allows us to dramatically accelerate the calculations of the networks, because we can use matrix operations and their associated optimizations to represent the layers. Sometimes this is called vectorization, and itâs a key to why deep learning has become so successful.
Once students implement layers in MiniFlow, they learn about a particular activation function: the sigmoid function. Activation functions define the extent to which each neuron is âonâ or âoffâ. Sophisticated activation functions, like the sigmoid function, donât have to be all the way âonâ or âoffâ. They can hold a value somewhere along the activation function, between 0 and 1.
The sigmoid function.
The next step is to train the network to better classify our data. For example, if we want the network to recognize handwriting, we need to adjust the weight associated with each neuron in order to achieve the correct classification. Students implement an optimization technique called gradient descent to determine how to adjust the weights of the network.
Gradient descent, or finding the lowest point on the curve.
Finally, students implement backpropagation to relay those weight adjustments backwards through the networks, from finish to start. If we do this thousands of times, hopefully weâll wind up with a trained, accurate network.
And once students have finished this lesson, they have their own Python library they can use to build as many neural networks as they want!
I was on vacation last week and it was delightful. But despite valiant struggles, I was not able to fully stay on top of the latest news in the autonomous vehicle world.
The Tesla Semi drew excitement from the crowd at the Hawthorne, California facility, as people eagerly waited for Musk to emerge from the big truck. But the surprise showing of the second-generation Tesla Roadster caused explosive cheers from the second its headlights switched on.
Barra said GM aims to be selling 1 million electric vehicles a year by 2026, many of them in China, which has set strict production quotas on such vehicles. On Monday, GMâs China chief said the automaker and its joint-venture partners will be able to meet the countryâs 2019 electric vehicle requirements without purchasing credits from other companies.
The Mercedes-Benz team in Israel will both develop in-house technologies and scout the ecosystem for products that could be integrated into their pipeline, either through acquisitions, long-term co-operations with startups, or investments.
JaguarLand Rover announced Friday that it will test its self-driving vehicles on public roads in the United Kingdom. Its vehicles will amble around Coventry as its engineers assess the systems and prepare this technology for an eventual public debutâââwhich is still years away, it should be noted.
Udacity and Infosys are uniting the elements of education and transformative technology in this one-of-a-kind program. Trainees, with the first 100 selected through a global hackathon in late November, will immerse themselves in autonomous technology courses that require hands-on training to simulate real-life scenarios. By the end of 2018, Infosys will have trained 500 employees on the spectrum of technologies that go into building self-driving vehicles, and in doing so will help to evolve the future of transportation for drivers, commuters and even mass transit systems.
And Udacity CEO Vishal Makhijani:
This program will be part of Udacity Connect, which is Udacityâs in-person, blended learning program. Infosys engineers from around the world will participate in Udacityâs online Self-Driving Car Engineer Nanodegree program, and combine one term of online studies with two terms of being physically located together at the Infosys Mysore training facility, where the program will be facilitated by an in-person Udacity session lead.
Two aspects of this partnership are particularly exciting for me. One is simply working with a top technology company like Infosys. When we started building the Nanodegree program, our objective was to âbecome the industry standard for training self-driving car engineers.â This partnership moves us significantly closer to that objective. We are grateful and excited for the opportunity, and thrilled for the participating engineers.
The other exciting aspect of this partnership is that it will happen in India. The Infosys engineers will fly in from all over the world, but there is something special about conducting the program in Mysore.
For many years autonomous vehicle development has happened in just a few places: Detroit, Pittsburgh, southern Germany. Recently, weâve seen autonomous vehicle development expand to Silicon Valley, Japan, Israel, various parts of Europe, Singapore, and beyond. Training autonomous vehicle engineers in India expands the opportunities for students worldwide.
7% of students in the Udacity Self-Driving Car Engineer Nanodegree program are from India. The Infosys partnership is an important next step in building a robust pipeline of job opportunities for our students on the subcontinent.
One of the world-class experts in our Self-Driving Car Engineer Nanodegree program!
Me and Andrei Vatavu and Dominik Nuss
One of the delights of teaching at Udacity is the opportunity to work with world-class experts who are excited about sharing their knowledge with our students.
We have the great fortune of working with Mercedes-Benz Research and Development North America (MBRDNA) to build the Self-Driving Car Engineer Nanodegree Program. In particular, we get to work with Dominik Nuss, principal engineer on their sensor fusion team.
In these two videos, Dominik explains how unscented Kalman filters fuse together data from multiple sensors across time:
These are just a small part of a much larger unscented Kalman filter lesson that Dominik teaches. This is an advanced, complex topic I havenât seen covered nearly as well anywhere else.
MBRDNA has just published a terrific profile of Dominik, along with a nifty video of him operating one of the Mercedes-Benz autonomous vehicles.
Read the whole thing and learn what itâs like to work on one of the top teams in the industry. Then, enroll in our program (if you havenât already!), and start building your OWN future in this amazing field!
While Uber and Waymo were working through regulatory barriers testing in California, Ducey recruited them to Arizona with an âopen for businessâ attitude.
âWe responded by saying we werenât going to hassle them,â Mr. Ducey said of Uber. âIâd be remiss if I didnât thank my partner in growing the Arizona economy, Jerry Brownâ, the Democratic governor of California.
The article closes with several anecdotes of human drivers crashing into self-driving cars, because thatâs what human drivers do, and seizes on those anecdotes to suggest Arizona isnât ready for self-driving cars.
Iâm not sold.
Louis Brandeis once postulated that the beauty of American federalism is that each state is its own little laboratory of democracy, experimenting on its own, without risk to the rest of the country.
With self-driving cars already being tested in cities across the United States and in several parts of the world, there have been three big questions about how quickly self-driving cars would expand:
How quickly will the geofences around the (usually urban) test areas expand?
When will companies open their services to the general public?
How soon will companies pull the test driver from the vehicle?
Waymo just went ahead and answered #3. In a blog post and accompanying video (above), Waymo just announced that they have pulled the driver out of the seat on a subset of their test vehicles in the Phoenix, Arizona, metro area.
This looks like the latest step in a campaign by Waymo to both step forward in their self-driving efforts, and reassure the public that everything will be okay. And it looks like everything will be okay.
A few thoughts of my own to accompany the Waymo announcement:
This is awesome, and it has the potential to be huge if Waymo continues to roll this out to the rest of their test fleet in a timely manner.
Waymo doesnât say it, but I have to believe that, for now, they have test engineers near the driverless vehicles. They might be in trailing vehicles or at some sort of central command point to which the driverless vehicles are geofenced. I wouldnât want an accident to happen (even an accident thatâs not Waymoâs fault) and have civilian passengers be the first ones to talk with police and the press.
As I understand it, these rides are carrying civilian, non-Waymo employees, but theyâre also pre-screened for the program. The next step for Waymo will be what Uber has already done in Pittsburgh: open the program up to anybody who downloads the app.
Itâs an exciting time for self-driving cars đ