Keras Preprocesing Layers 中的Resizing、Rescaling

  layers.experimental.preprocessing.Resizing(IMG_SIZE, IMG_SIZE), 
  layers.experimental.preprocessing.Rescaling(1./255)

调整大小层将图片大小变为 IMG_SIZE*IMG_SIZE

缩放层将像素值标准化为[0,1], 如果将图片标准化为[-1,1],可尝试如下代码

 

  layers.experimental.preprocessing.Rescaling(1./127.5, offset=-1)

 

你可能感兴趣的:(python,图像处理,深度学习,tensorflow,深度学习)