File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -182,9 +182,9 @@ def main(argv):
182
182
train_file = os .path .join (flags .data_dir , 'adult.data' )
183
183
test_file = os .path .join (flags .data_dir , 'adult.test' )
184
184
185
- # Train and evaluate the model every `FLAGS.epochs_per_eval ` epochs.
185
+ # Train and evaluate the model every `flags.epochs_between_evals ` epochs.
186
186
def train_input_fn ():
187
- return input_fn (train_file , flags .epochs_per_eval , True , flags .batch_size )
187
+ return input_fn (train_file , flags .epochs_between_evals , True , flags .batch_size )
188
188
189
189
def eval_input_fn ():
190
190
return input_fn (test_file , 1 , False , flags .batch_size )
@@ -194,7 +194,7 @@ def eval_input_fn():
194
194
tensors_to_log = {'average_loss' : 'head/truediv' ,
195
195
'loss' : 'head/weighted_loss/Sum' })
196
196
197
- # Train and evaluate the model every `FLAGS .epochs_between_evals` epochs.
197
+ # Train and evaluate the model every `flags .epochs_between_evals` epochs.
198
198
for n in range (flags .train_epochs // flags .epochs_between_evals ):
199
199
model .train (input_fn = train_input_fn , hooks = train_hooks )
200
200
results = model .evaluate (input_fn = eval_input_fn )
You can’t perform that action at this time.
0 commit comments