Creating custom estimators

A premade estimator limits the full potential to which TensorFlow can be used; for example, we would not be able to have different dropout values after different layers. In this regard, let's go ahead and create a function of our own, as follows:

Let's explore each part of the preceding snippet of code in detail:

The function takes features (independent variables) and labels (dependent variable) as input. mode indicates whether we want to train, predict, or evaluate the given data.

params provides us with the functionality ...

Get Hands-On Machine Learning on Google Cloud Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.