📅  最后修改于: 2022-03-11 14:45:22.853000             🧑  作者: Mango
# load image
image = Image.open('sydney_bridge.jpg')
pixels = asarray(image)
# convert from integers to floats
pixels = pixels.astype('float32')
# normalize to the range 0-1
pixels /= 255.0