Skip to content

Instantly share code, notes, and snippets.

@ispamm
Created November 27, 2018 11:22
Show Gist options
  • Save ispamm/efc473172a3267bd133d284a33d87224 to your computer and use it in GitHub Desktop.
Save ispamm/efc473172a3267bd133d284a33d87224 to your computer and use it in GitHub Desktop.
# Load filenames and labels
filenames = tf.constant(train_data.iloc[:, 0].tolist())
labels = tf.constant(train_data.iloc[:, 1:].values)
# Add to a dataset object
dataset = tf.data.Dataset.from_tensor_slices((filenames, labels))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment