Skip to content

Instantly share code, notes, and snippets.

View csetzkorn's full-sized avatar
🎯
Focusing

Chris Setzkorn csetzkorn

🎯
Focusing
View GitHub Profile
@csetzkorn
csetzkorn / gist:7b134cd25ccf08c508aeb002ddf699a9
Last active September 5, 2018 12:39
simple text classification example using keras and word embedding
from numpy import array
from keras.preprocessing.text import one_hot
from keras.preprocessing.sequence import pad_sequences
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import Flatten
from keras.layers.embeddings import Embedding
# see also: https://machinelearningmastery.com/use-word-embedding-layers-deep-learning-keras/