Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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


tfestimators

Interface to 'TensorFlow' Estimators

v1.9.1
Apache License 2.0
Authors
JJ Allaire [aut], Yuan Tang [aut] (<https://orcid.org/0000-0001-5243-233X>), Kevin Ushey [aut], Kevin Kuo [aut, cre] (<https://orcid.org/0000-0001-7803-7901>), Daniel Falbel [ctb, cph], RStudio [cph, fnd], Google Inc. [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.