We can proceed with the recipe as follows:
- Load all the Keras modules needed by the recipe. These include spaCy for word embedding, VGG16 for image features extraction, and LSTM for language modeling. The remaining few additional modules are pretty standard:
%matplotlib inlineimport os, argparseimport numpy as npimport cv2 as cv2import spacy as spacyimport matplotlib.pyplot as pltfrom keras.models import Model, Inputfrom keras.layers.core import Dense, Dropout, Reshapefrom keras.layers.recurrent import LSTMfrom keras.layers.merge import concatenatefrom keras.applications.vgg16 import VGG16from keras.preprocessing import imagefrom keras.applications.vgg16 import preprocess_inputfrom sklearn.externals import joblibimport PIL.Image ...