lstm multiclass model in keras code example
Example: lstm multiclass model in keras
# The maximum number of words to be used. (most frequent)MAX_NB_WORDS = 50000# Max number of words in each complaint.MAX_SEQUENCE_LENGTH = 250# This is fixed.EMBEDDING_DIM = 100tokenizer = Tokenizer(num_words=MAX_NB_WORDS, filters='!"#$%&()*+,-./:;<=>?@[\]^_`{|}~', lower=True)tokenizer.fit_on_texts(df['Consumer complaint narrative'].values)word_index = tokenizer.word_indexprint('Found %s unique tokens.' % len(word_index))