tf.train.basic_train_loop(supervisor, train_step_fn, args=None, kwargs=None, master='')
See the guide: Training > Training Utilities
Basic loop to train a model.
train_step_fn in a loop to train a model. The function is called as:
train_step_fn(session, *args, **kwargs)
It is passed a
tf.Session in addition to
kwargs. The function
typically runs one training step in the session.
tf.Supervisorto run the training services.
train_step_fn: Callable to execute one training step. Called repeatedly as
train_step_fn(session, *args **kwargs).
args: Optional positional arguments passed to
kwargs: Optional keyword arguments passed to
master: Master to use to create the training session. Defaults to
""which causes the session to be created in the local process.