Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
run_config = tf.estimator.RunConfig(model_dir=MODEL_DIR, save_summary_steps=4000, save_checkpoints_steps=4000)
estimator = keras.estimator.model_to_estimator(keras_model=model, config=run_config)
train_spec = tf.estimator.TrainSpec(input_fn=input_function(train_df_scaled, train_labels, True),
max_steps=STEPS)
eval_spec = tf.estimator.EvalSpec(input_fn=input_function(validation_df_scaled, validation_labels, True),
steps=1200, throttle_secs=350)
tf.estimator.train_and_evaluate(estimator, train_spec=train_spec, eval_spec=eval_spec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment