from keras.datasets import imdb from keras import layers from keras import models from keras import optimizers import matplotlib.pyplot as plt import numpy as np def vectorize_data(x, dim = 10000): res = np.zeros([len(x), dim]) for i, string in enume