我在学习keras教程时运行了这段代码
import keras mnist = keras.datasets.mnist (x_train, y_train), (x_test, y_test) = mnist.load_data()
我收到了这个错误消息属性错误:模块"keras"没有属性"datasets"我试着用同样的问题查找其他人,但似乎找不到确切的答案。我该如何解决这个问题?
pvcm50d11#
编辑代码:
import tensorflow.keras as tk mnist = tk.datasets.mnist (x_train, y_train), (x_test, y_test) = mnist.load_data()
参考:https://keras.io/api/datasets/https://www.tensorflow.org/api_docs/python/tf/keras/datasets/mnist/load_data
1条答案
按热度按时间pvcm50d11#
编辑代码:
参考:
https://keras.io/api/datasets/
https://www.tensorflow.org/api_docs/python/tf/keras/datasets/mnist/load_data