From the course: TensorFlow: Practical Skills in Constructing, Training, and Optimizing Models

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Utilizing variables and placeholders

Utilizing variables and placeholders

- [Instructor] Ever seen machine learning models that adapt as new and different data come in? That's the magic of using variables and placeholders in TensorFlow, and you can harness it too. In this lesson, I'll dive into how these elements work to make your models dynamic and efficient. Now at this point, I need to mention an important difference between TensorFlow 1 and TensorFlow 2, which came out in late 2019. TensorFlow 2 moved to eager execution by default with an emphasis on functions rather than using lazy execution and emphasizing sessions. What that means for you is that if you're using TensorFlow 2, then you shouldn't have to worry about using placeholders very much because now with eager execution, you can debug right as you build. But if you're using TensorFlow 1, you'll need to build your network before introducing it to data, and so you'll likely need to take advantage of variables and placeholders. Go ahead and open up 02_03_Variables.ipynb. I'll start with variables…

Contents