解决Jupyter Notebook中'ModuleNotFoundError: No module named 'tensorflow.examples'' 错误
这个错误可能是因为tensorflow版本更新导致的,新版本中已经将'tensorflow.examples'模块移除了。可以使用以下代码替换原来的导入方式:
from tensorflow.keras.datasets import mnist
# 加载MNIST数据集
(x_train, y_train), (x_test, y_test) = mnist.load_data()
这样就可以加载MNIST数据集了。
原文地址: https://www.cveoy.top/t/topic/jO6w 著作权归作者所有。请勿转载和采集!