Function Reference

Canned Estimators

linear_regressor() linear_classifier()

Construct a Linear Estimator

dnn_regressor() dnn_classifier()

Deep Neural Networks

dnn_linear_combined_regressor() dnn_linear_combined_classifier()

Linear Combined Deep Neural Networks

Estimator Methods

train(<tf_estimator>)

Train an Estimator

predict(<tf_estimator>)

Generate Predictions with an Estimator

evaluate(<tf_estimator>)

Evaluate an Estimator

export_savedmodel(<tf_estimator>)

Save an Estimator

Input Function

input_fn()

Construct an Input Function

numpy_input_fn()

Construct Input Function Containing Python Dictionaries of Numpy Arrays

Feature Columns

feature_columns()

Feature Columns

input_layer()

Construct an Input Layer

column_categorical_with_vocabulary_list()

Construct a Categorical Column with In-Memory Vocabulary

column_categorical_with_vocabulary_file()

Construct a Categorical Column with a Vocabulary File

column_categorical_with_identity()

Construct a Categorical Column that Returns Identity Values

column_categorical_with_hash_bucket()

Represents Sparse Feature where IDs are set by Hashing

column_categorical_weighted()

Construct a Weighted Categorical Column

column_indicator()

Represents Multi-Hot Representation of Given Categorical Column

column_numeric()

Construct a Real-Valued Column

column_embedding()

Construct a Dense Column

column_crossed()

Construct a Crossed Column

column_bucketized()

Construct a Bucketized Column

Custom Estimators

estimator()

Construct a Custom Estimator

estimator_spec()

Define an Estimator Specification

Run Hooks

hook_checkpoint_saver()

Saves Checkpoints Every N Steps or Seconds

hook_global_step_waiter()

Delay Execution until Global Step Reaches to wait_until_step.

hook_history_saver()

A Custom Run Hook for Saving Metrics History

hook_logging_tensor()

Prints Given Tensors Every N Local Steps, Every N Seconds, or at End

hook_nan_tensor()

NaN Loss Monitor

hook_progress_bar()

A Custom Run Hook to Create and Update Progress Bar During Training or Evaluation

hook_step_counter()

Steps per Second Monitor

hook_stop_at_step()

Monitor to Request Stop at a Specified Step

hook_summary_saver()

Saves Summaries Every N Steps

session_run_hook()

Create Custom Session Run Hooks

Run Configuration

run_config()

Run Configuration

task_type()

Task Types

Estimator Keys

mode_keys()

Canonical Mode Keys

metric_keys()

Canonical Metric Keys

prediction_keys()

Canonical Model Prediction Keys

Parsing Utilities

regressor_parse_example_spec()

Generates Parsing Spec for TensorFlow Example to be Used with Regressors

classifier_parse_example_spec()

Generates Parsing Spec for TensorFlow Example to be Used with Classifiers

Other Utilities

graph_keys()

Standard Names to Use for Graph Collections

latest_checkpoint()

Get the Latest Checkpoint in a Checkpoint Directory