Skip to content

Instantly share code, notes, and snippets.

@sararob
Created August 14, 2018 18:26
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 sararob/147927f1914a2bf0e828dbc4cc4c6179 to your computer and use it in GitHub Desktop.
Save sararob/147927f1914a2bf0e828dbc4cc4c6179 to your computer and use it in GitHub Desktop.
# Format our data for the numpy_input_fn
features = {
"descriptions": np.array(train_descriptions)
}
labels = np.array(train_encoded)
train_input_fn = tf.estimator.inputs.numpy_input_fn(
features,
labels,
shuffle=True,
batch_size=32,
num_epochs=20
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment