Add an in-memory evaluator for Estimator. It will run evaluation without a...
Add an in-memory evaluator for Estimator. It will run evaluation without a checkpoint. This will let user get evaluation metrics on more steps without saving.
Example:
```python
def train_input_fn():
...
return train_dataset
def eval_input_fn():
...
return eval_dataset
estimator = tf.estimator.DNNClassifier(...)
evaluator = tf.contrib.estimator.InMemoryEvaluatorHook(
estimator, eval_input_fn)
estimator.train(train_input_fn, hooks=[evaluator])
```
PiperOrigin-RevId: 197181726
Loading
Please sign in to comment