This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import numpy as np | |
import keras | |
import keras.preprocessing.text as kpt | |
from keras.preprocessing.text import Tokenizer | |
from keras.models import model_from_json | |
# we're still going to use a Tokenizer here, but we don't need to fit it | |
tokenizer = Tokenizer(num_words=3000) | |
# for human-friendly printing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import keras.backend as K | |
import multiprocessing | |
import tensorflow as tf | |
from gensim.models.word2vec import Word2Vec | |
from keras.callbacks import EarlyStopping | |
from keras.models import Sequential | |
from keras.layers.core import Dense, Dropout, Flatten | |
from keras.layers.convolutional import Conv1D |