UserWarning:默认模式'constant'将在skimage 0.15中更改为'reflect'

UserWarning:默认模式’constant’将在skimage 0.15中更改为’reflect’

出现这个警告的原因出在进行图像缩放(调整大小)处:

img = transform.resize(img, (IMG_SIZE, IMG_SIZE))
  • 若使用版本号<0.15的skimage,添加mode ='constant’来调整大小,可以消除警告
img = transform.resize(img, (IMG_SIZE, IMG_SIZE), mode='constant')
  • 若使用版本号>=0.15的skimage,添加mode ='reflect’来调整大小,可以消除警告
img = transform.resize(img, (IMG_SIZE, IMG_SIZE), mode='reflect')

No module named ‘skimage’ 解决方式: 安装包 scikit-image

发布了22 篇原创文章 · 获赞 21 · 访问量 7021

猜你喜欢

转载自blog.csdn.net/weixin_43108122/article/details/100008271