Closed ryangawei closed 5 years ago
在model.py文件中
def image_to_tensor(image): tensor = np.asarray(image).reshape(-1, 2304) * 1 / 255.0 return tensor
我觉得应该是把灰度从0-255变换到0-1范围内,提高图像的亮度,使图像的细节更加清楚
The value of pixies is range from 0 to 255, the purpose of dividing 255 is normalization.
在model.py文件中
def image_to_tensor(image): tensor = np.asarray(image).reshape(-1, 2304) * 1 / 255.0 return tensor