Skip to content

Instantly share code, notes, and snippets.

View AtticusYang's full-sized avatar

Atticus Yang AtticusYang

View GitHub Profile
@AtticusYang
AtticusYang / loadModel.py
Created May 13, 2018 07:36 — forked from vgpena/loadModel.py
Basic text classification with Keras and TensorFlow
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