def load_image(path, height, width, mode='RGB'):
 image = PIL.Image.open(path)
 image = image.convert(mode)
 image = np.array(image)
 image = scipy.misc.imresize(image, (height, width), 'bilinear')
 return image

def load_image ( path , height , width , mode = 'RGB' ) : image = PIL . Image . open ( path ) image = image . convert ( mode ) image = np . array ( image ) image = scipy . misc . imresize ( image , ( height , width ) , 'bilinear' ) return image
load an image from disk returns an np .