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