win10下的python3程序报错如题,
TypeError: float() argument must be a string or a number, not 'map'
具体出错的语句:
image_batch = np.array(map(lambda x: ndimage.imread(x, mode='RGB'), image_batch_file)).astype(np.float32)
网上查到map外要加list(),改成下面语句就解决了:
image_batch = np.array(list(map(lambda x: ndimage.imread(x, mode='RGB'), image_batch_file))).astype(np.float32)