August 2018
Intermediate to advanced
438 pages
12h 3m
English
The next steps include loading up the necessary data, model, and other assets from disk into memory. We first load up our test dataset and our trained deep learning models:
# load test dataset
test_df = pd.read_csv('image_test_dataset.tsv', delimiter='\t')
# load the models
from keras.models import load_model
model1 = load_model('ic_model_rmsprop_b256ep30.h5')
model2 = load_model('ic_model_rmsprop_b256ep50.h5')
We now need to load up necessary metadata assets, such as the image features we extracted before for our test data, and our vocabulary metadata:
from sklearn.externals import joblib tl_img_feature_map = joblib.load('transfer_learn_img_features.pkl') vocab_metadata = joblib.load('vocabulary_metadata.pkl') ...Read now
Unlock full access