Skip to content

Instantly share code, notes, and snippets.

@joydeb28
Last active April 20, 2020 08:49
Show Gist options
  • Save joydeb28/782b42a6af8cc793e6b60de96fd0aa31 to your computer and use it in GitHub Desktop.
Save joydeb28/782b42a6af8cc793e6b60de96fd0aa31 to your computer and use it in GitHub Desktop.
Simple Text Generation Using LSTM:Deep Learning
from numpy import array
import tensorflow as tf
from tensorflow.keras.preprocessing.text import Tokenizer
from tensorflow.keras.utils import to_categorical
from tensorflow.keras.preprocessing.sequence import pad_sequences
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
from tensorflow.keras.layers import LSTM
from tensorflow.keras.layers import Dropout
from tensorflow.keras.layers import Embedding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment