Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit c43366e

Browse files
authored
Update 20200117-tfx-generic-trainer.md
1 parent e4865fd commit c43366e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rfcs/20200117-tfx-generic-trainer.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,10 @@ def run_fn(args: trainer.executor.TrainerFnArgs) -> None:
237237
"""Build the TF model and train it."""
238238
ps_strategy = tf.distribute.experimental.ParameterServerStrategy()
239239
with ps_strategy.scope():
240+
train_dataset = _create_dataset(args.train_files, ...)
241+
eval_dataset = _create_dataset(args.eval_files, ...)
240242
model = _build_keras_model()
241-
model.fit(...)
243+
model.fit(train_dataset, validation_data=eval_dataset, ...)
242244
if _is_chief():
243245
model.save(...)
244246
```

0 commit comments

Comments
 (0)