Skip to content

Instantly share code, notes, and snippets.

@hadifar
Created December 6, 2018 08:25
Show Gist options
  • Save hadifar/d73872b4f1a38cae3e639f41cc05a134 to your computer and use it in GitHub Desktop.
Save hadifar/d73872b4f1a38cae3e639f41cc05a134 to your computer and use it in GitHub Desktop.
(train_data, train_labels), (test_data, test_labels) = tf.keras.datasets.imdb.load_data(num_words=vocabulary_size)
train_data = tf.keras.preprocessing.sequence.pad_sequences(train_data, maxlen=256)
test_data = tf.keras.preprocessing.sequence.pad_sequences(test_data, maxlen=256)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment