Commit 1730eed4 authored by Nicholas Connor's avatar Nicholas Connor Committed by Katherine Wu
Browse files

Bug fix on flag name in wide_deep.py (#3777)

PR #3460 renamed FLAGS.epochs_per_eval to flags.epochs_between_evals; it missed this one
parent 86cb0aa3
......@@ -182,9 +182,9 @@ def main(argv):
train_file = os.path.join(flags.data_dir, 'adult.data')
test_file = os.path.join(flags.data_dir, 'adult.test')
# Train and evaluate the model every `FLAGS.epochs_per_eval` epochs.
# Train and evaluate the model every `flags.epochs_between_evals` epochs.
def train_input_fn():
return input_fn(train_file, flags.epochs_per_eval, True, flags.batch_size)
return input_fn(train_file, flags.epochs_between_evals, True, flags.batch_size)
def eval_input_fn():
return input_fn(test_file, 1, False, flags.batch_size)
......@@ -194,7 +194,7 @@ def main(argv):
tensors_to_log={'average_loss': 'head/truediv',
'loss': 'head/weighted_loss/Sum'})
# Train and evaluate the model every `FLAGS.epochs_between_evals` epochs.
# Train and evaluate the model every `flags.epochs_between_evals` epochs.
for n in range(flags.train_epochs // flags.epochs_between_evals):
model.train(input_fn=train_input_fn, hooks=train_hooks)
results = model.evaluate(input_fn=eval_input_fn)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment