August 2018
Intermediate to advanced
438 pages
12h 3m
English
All the components for the model's performance evaluation are now ready. To evaluate our model's performance on the test dataset, we will now be loading up the image features we had extracted earlier using transfer learning, which will serve as input to our models. We will also load up the captions, preprocess them, and separate them as lists of reference captions for each image, as depicted here:
test_images = list(test_df['image'].unique()) test_img_features = [tl_img_feature_map[img_name] for img_name in test_images] actual_captions = list(test_df['caption']) actual_captions = preprocess_captions(actual_captions) actual_captions = [actual_captions[x:x+5] for x in range(0, len(actual_captions),5)] ...
Read now
Unlock full access