Skip to content

Instantly share code, notes, and snippets.

@omchaithanyav
Last active July 11, 2021 16:53
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 omchaithanyav/9bae2682fc053e1a281b8ec83d74e941 to your computer and use it in GitHub Desktop.
Save omchaithanyav/9bae2682fc053e1a281b8ec83d74e941 to your computer and use it in GitHub Desktop.
samples = 2200
X_train = X_train[samples:]
y_train = y_train[samples:]
X_val = X_train[:samples]
y_val = y_train[:samples]
X_train_encoded_words = Tokenizer.texts_to_sequences(X_train)
X_val_encoded_words = Tokenizer.texts_to_sequences(X_val)
X_train_encoded_padded_words = sequence.pad_sequences(X_train_encoded_words, maxlen = 4000)
X_val_encoded_padded_words = sequence.pad_sequences(X_val_encoded_words, maxlen = 4000)
X_train_encoded_padded_words.shape, X_val_encoded_padded_words.shape
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment