1.加载人脸数据集报:URLError:SSL ...
网络问题,加上下面红色的两行:
from sklearn.datasets import fetch_lfw_people
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
faces=fetch_lfw_people(min_faces_per_person=70)
2.加载人脸数据集报:ImportError: The Python Imaging Library (PIL) is required to load data from jpeg files
检查pip3是否已安装Pillow
安装Image库:pip3 install Image
如果是用jupyter notebook的记得重启notebook再运行
3.tensorflow keras加载mnist数据集报网络错误
from tensorflow.keras import datasets datasets.mnist.load_data()报URL fetch failure
看日志下载地址为https://storage.googleapis.com/tensorflow/tf-keras-datasets/mnist.npz
先本地下载mnist.npz再copy到~/.keras/datasets下即可