TensorFlow

Jessica Beaver
4 min readJan 14, 2021

An Introduction to Deep Learning

Image Source: https://cdn-images-1.medium.com/max/1200/1*iDQvKoz7gGHc6YXqvqWWZQ.png

Beginning in the 1950s, with the pioneering work of Alan Turing, and continuing through today, engineers mathematicians and philosophers have been trying to answer the question, “Can machines think”? This question, while still ultimately unanswered, has spurred decades of research and innovation fueled by the concept of artificial intelligence. One such innovation, TensorFlow, eases the barrier of entry to deep learning.

What is Deep Learning?

Understanding deep learning requires an overview of broader artificial intelligence. AI is a wide-ranging branch of computer science with the frustratingly vague definition of “the theory and development of computer systems able to perform tasks that normally require human intelligence.”¹ Developments in AI lead to machine learning, which at the most basic level is the practice of using algorithms to parse data, learn from it and then make a determination or prediction based upon the input data. Finally, after the advancement of computing power, came deep learning which is simply a technique for implementing machine learning.

Weak AI vs Strong AI

As IBM states, “Weak AI, also known as narrow AI, focuses on performing a specific task, such as answering questions based on user input or playing chess. It can perform one type of task, but not both, whereas Strong AI can perform a variety of functions, eventually teaching itself to solve for new problems.” In order to make the transition from Weak AI to Strong AI, machines need to learn the ways of humans. Enter: machine learning. Machine learning can be either supervised — predicting outcomes with human help — or unsupervised — predicting outcomes on the go by recognizing patterns in input data. When machines are able to draw inferences on their own from large volumes of data sets, they are demonstrating the ability to learn deeply. Deep learning requires artificial neural networks (ANNs), inspired by the structure of human neural networks, that make sense of voluminous input data by creating layers of graphs with connected nodes that communicate with each other.²

ANN Model Source: https://miro.medium.com/max/1400/1*Gh5PS4R_A5drl5ebd_gNrg@2x.png

A few years back, with the advancement of CPU capabilities and the introduction of large GPUs to machine learning, deep learning with huge data sets began to outperform supervised algorithms. Google saw the opportunity to improve its services using the deep neural networks and in 2015 they released their own open-source deep learning library, TensorFlow.

Introduction to TensorFlow

Originally released in 2015, TensorFlow 1.0 had only Python and C++ APIs that ran on a C/C++ backend to quickly compute data flow graphs. TensorFlow works, broadly, by taking Tensors (essentially a fancy word for an array) and a data flow graph that then is able to give back a summary of the weighted model. In Q4 of 2019, Google released version 2.0 which expanded the languages included in APIs and generally made it more accessible. The emphasis was moved from sessions to imperative functions, removing some of the manual work required to utilize TensorFlow.

TensorFlow v2.0

The beauty of TensorFlow is that is a singular framework for doing machine learning that covers the spectrum of use cases. Everyone from the novice user to the most advanced deep learning researchers can all use TensorFlow. That is thanks to the scalability of complexity of its APIs.

Image Source: https://towardsdatascience.com/applied-deep-learning-part-1-artificial-neural-networks-d7834f67a4f6

Novices can start with Sequential API that lets you define the input to send through some built-in layers with a desired output. This is far and away the easiest way to develop deep learning models today and utilizes a stack of layers. Next in complexity is the Functional API which is mostly used by engineers for standard-use and if more control is required. The most complex API is the Model Subclassing which is used by the most advanced researchers and requires that you write both the models for input/output and the layers from scratch.

Conclusion

Thanks to the innovation of the TensorFlow team and all the open-sourcing that has come with it, incorporating deep-learning models into your code is easier than ever before!

--

--