From the course: Building and Deploying Deep Learning Applications with TensorFlow

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Build a simple model in TensorFlow

Build a simple model in TensorFlow - TensorFlow Tutorial

From the course: Building and Deploying Deep Learning Applications with TensorFlow

Start my 1-month free trial

Build a simple model in TensorFlow

- [Voiceover] Let's practice the basic mechanics of TensorFlow by starting with something simple. Let's build a TensorFlow computational graph that adds two numbers together. Here's what the computational graph will look like. This graph has two inputs, X and Y. Those are the two numbers we want to add together. This graph also has one operation called 'addition'. That note simply adds together the tensors passed into it. Once this graph is defined, we can use it by creating a new TensorFlow session. Then we'll feed in values for X and Y, and we'll ask the session object to execute the addition node. The result we get back from executing the addition node will be the answer. Let's open up addition.py. Here on line two, we've imported TensorFlow so we have access to it. It's standard practice to import it with the name 'TF' so that we don't have to type out the whole word 'TensorFlow' every time we want to call a function. Next on line five, notice that I've called OS.Environ to set…

Contents