(master,
          tpu_cluster,
          model_fn,
          data_fn,
          additional_trial_info,
          model_dir,
          preprocess_examples,
          hparams,
          keep_checkpoint_max,
          use_tpu,
          num_steps=None,
          warm_start_from=None)
Train loop.
Train loop.
Train loop .
def train(master,
          tpu_cluster,
          model_fn,
          data_fn,
          additional_trial_info,
          model_dir,
          preprocess_examples,
          hparams,
          keep_checkpoint_max,
          use_tpu,
          num_steps=None,
          warm_start_from=None):
  """Train loop."""
  estimator = create_estimator(
      model_fn=model_fn,
      model_dir=model_dir,
      master=master,
      tpu_cluster=tpu_cluster,
      hparams=hparams,
      keep_checkpoint_max=keep_checkpoint_max,
      use_tpu=use_tpu,
      warm_start_from=warm_start_from
  )

  if estimator.config.is_chief:
    _trial_summary(
        hparams=hparams,
        model_dir=model_dir,
        output_dir=model_dir,
        additional_trial_info=additional_trial_info)

  transcription_data = functools.partial(
      data_fn,
      preprocess_examples=preprocess_examples,
      is_training=True,
      shuffle_examples=True,
      skip_n_initial_records=0)

  estimator.train(input_fn=transcription_data, max_steps=num_steps)
def train ( master , tpu_cluster , model_fn , data_fn , additional_trial_info , model_dir , preprocess_examples , hparams , keep_checkpoint_max , use_tpu , num_steps = None , warm_start_from = None ) : estimator = create_estimator ( model_fn = model_fn , model_dir = model_dir , master = master , tpu_cluster = tpu_cluster , hparams = hparams , keep_checkpoint_max = keep_checkpoint_max , use_tpu = use_tpu , warm_start_from = warm_start_from ) if estimator . config . is_chief : _trial_summary ( hparams = hparams , model_dir = model_dir , output_dir = model_dir , additional_trial_info = additional_trial_info ) transcription_data = functools . partial ( data_fn , preprocess_examples = preprocess_examples , is_training = True , shuffle_examples = True , skip_n_initial_records = 0 ) estimator . train ( input_fn = transcription_data , max_steps = num_steps )