tfestimators (version 1.9.1)

train_spec: Configuration for the train component of train_and_evaluate

Description

TrainSpec determines the input data for the training, as well as the duration. Optional hooks run at various stages of training.

Usage

train_spec(input_fn, max_steps = NULL, hooks = NULL)

Arguments

input_fn

Training input function returning a tuple of:

  • features - Tensor or dictionary of string feature name to Tensor.

  • labels - Tensor or dictionary of Tensor with labels.

max_steps

Positive number of total steps for which to train model. If NULL, train forever. The training input_fn is not expected to generate OutOfRangeError or StopIteration exceptions.

hooks

List of session run hooks to run on all workers (including chief) during training.

See Also

Other training methods: eval_spec, train_and_evaluate.tf_estimator