def do_test_multi_inputs_multi_outputs_with_input_fn(self, train_input_fn, eval_input_fn):
    config = run_config_lib.RunConfig(tf_random_seed=_RANDOM_SEED, model_dir=self._base_dir, train_distribute=self._dist)
    with self.cached_session():
        model = multi_inputs_multi_outputs_model()
        est_keras = keras_lib.model_to_estimator(keras_model=model, config=config)
        baseline_eval_results = est_keras.evaluate(input_fn=eval_input_fn, steps=1)
        est_keras.train(input_fn=train_input_fn, steps=(_TRAIN_SIZE / 16))
        eval_results = est_keras.evaluate(input_fn=eval_input_fn, steps=1)
        self.assertLess(eval_results['loss'], baseline_eval_results['loss'])
def do_test_multi_inputs_multi_outputs_with_input_fn(self, train_input_fn, eval_input_fn):
    config = run_config_lib.RunConfig(tf_random_seed=_RANDOM_SEED, model_dir=self._base_dir, train_distribute=self._dist)
    with self.cached_session():
        model = multi_inputs_multi_outputs_model()
        est_keras = keras_lib.model_to_estimator(keras_model=model, config=config)
        baseline_eval_results = est_keras.evaluate(input_fn=eval_input_fn, steps=1)
        est_keras.train(input_fn=train_input_fn, steps=(_TRAIN_SIZE / 16))
        eval_results = est_keras.evaluate(input_fn=eval_input_fn, steps=1)
        self.assertLess(eval_results['loss'], baseline_eval_results['loss'])