(img_coco_ids, img_map, VGGfeatures)
return image_matrix
Gets the 4096-dimensional CNN features for the given COCO
	images
	
	Input:
	img_coco_ids: 	A list of strings, each string corresponding to
				  	the MS COCO Id of the relevant image
	img_map: 		A dictionary that maps the COCO Ids to their indexes 
					in the pre-computed VGG features matrix
	VGGfeatures: 	A numpy array of shape (nb_dimensions,nb_images)

	Ouput:
	A numpy matrix of size (nb_samples, nb_dimensions)
Gets the 4096-dimensional CNN features for the given COCO
	images
	
	Input:
	img_coco_ids: 	A list of strings, each string corresponding to
				  	the MS COCO Id of the relevant image
	img_map: 		A dictionary that maps the COCO Ids to their indexes 
					in the pre-computed VGG features matrix
	VGGfeatures: 	A numpy array of shape (nb_dimensions,nb_images)
Gets the 4096 - dimensional CNN features for the given COCO images Input : img_coco_ids : A list of strings each string corresponding to the MS COCO Id of the relevant image img_map : A dictionary that maps the COCO Ids to their indexes in the pre - computed VGG features matrix VGGfeatures : A numpy array of shape ( nb_dimensions nb_images )
def get_images_matrix(img_coco_ids, img_map, VGGfeatures):
	'''
	Gets the 4096-dimensional CNN features for the given COCO
	images
	
	Input:
	img_coco_ids: 	A list of strings, each string corresponding to
				  	the MS COCO Id of the relevant image
	img_map: 		A dictionary that maps the COCO Ids to their indexes 
					in the pre-computed VGG features matrix
	VGGfeatures: 	A numpy array of shape (nb_dimensions,nb_images)

	Ouput:
	A numpy matrix of size (nb_samples, nb_dimensions)
	'''
	assert not isinstance(img_coco_ids, basestring)
	nb_samples = len(img_coco_ids)
	nb_dimensions = VGGfeatures.shape[0]
	image_matrix = np.zeros((nb_samples, nb_dimensions))
	for j in xrange(len(img_coco_ids)):
		image_matrix[j,:] = VGGfeatures[:,img_map[img_coco_ids[j]]]

	return image_matrix
def get_images_matrix ( img_coco_ids , img_map , VGGfeatures ) : assert not isinstance ( img_coco_ids , basestring ) nb_samples = len ( img_coco_ids ) nb_dimensions = VGGfeatures . shape [ 0 ] image_matrix = np . zeros ( ( nb_samples , nb_dimensions ) ) for j in xrange ( len ( img_coco_ids ) ) : image_matrix [ j , : ] = VGGfeatures [ : , img_map [ img_coco_ids [ j ] ] ] return image_matrix