Skip to content

Instantly share code, notes, and snippets.

Avatar

Christian Setzkorn csetzkorn

  • United Kingdom
View GitHub Profile
@csetzkorn
csetzkorn / gist:7b134cd25ccf08c508aeb002ddf699a9
Last active Sep 5, 2018
simple text classification example using keras and word embedding
View gist:7b134cd25ccf08c508aeb002ddf699a9
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/
You can’t perform that action at this time.