Created
April 30, 2020 21:10
-
-
Save priyanlc/de3d1aae853cec2b617518af3028f44b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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