Skip to content

Instantly share code, notes, and snippets.

@crawles
Created March 5, 2019 02:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crawles/e6ca4d9fb662457a85d520f3357a287a to your computer and use it in GitHub Desktop.
Save crawles/e6ca4d9fb662457a85d520f3357a287a to your computer and use it in GitHub Desktop.
# Since data fits into memory, use entire dataset per layer. It will be faster.
# Above one batch is defined as the entire dataset.
n_batches = 1
est = tf.estimator.BoostedTreesClassifier(feature_columns,
n_batches_per_layer=n_batches)
# The model will stop training once the specified number of trees is built, not
# based on the number of steps.
est.train(train_input_fn, max_steps=100)
# Eval.
result = est.evaluate(eval_input_fn)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment