def _get_image(self, fname):
"""
Args fname : filename of image
Returns the image as array with dim (w,h,channels) """
img = imgs.get(fname)
if img == None:
img = mpimg.imread(fname)
img = (img-128)/128
imgs[fname] = img
return img
评论列表
文章目录