Skip to content

Instantly share code, notes, and snippets.

@lakshmanok
Created August 13, 2018 16:13
Show Gist options
  • Select an option

  • Save lakshmanok/e20a50f674eddff66f73414911c8433a to your computer and use it in GitHub Desktop.

Select an option

Save lakshmanok/e20a50f674eddff66f73414911c8433a to your computer and use it in GitHub Desktop.
How to serve an embedding trained with Estimators
my_head = tf.contrib.estimator.regression_head()
spec = my_head.create_estimator_spec(
features = features, mode = mode,
labels = labels, logits = predictions,
optimizer = tf.train.FtrlOptimizer(learning_rate = 0.1)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment