科拉布 没有名为'tensorflow.examples.tutorials'的模块



我是这个领域的初学者使用Colab时,我遇到问题没有tensorflow.examples.tutorials我检查了一些东西是否存在只有一种东西叫做examples.saved_model

如果你知道如何下载或连接Colab

请给我一个解决方案

ModuleNotFoundError:Traceback (most recent call last)
<ipython-input-13-da20ef9adb09> in <module>()
----> 1 from tensorflow.examples.tutorials import mnist
ModuleNotFoundError: No module named 'tensorflow.examples.tutorials'

如有任何建议,我们将不胜感激。

ModuleNotFoundError: No module named 'tensorflow.examples.tutorials'

tensorflow.examples.tutorials现已弃用,因此您收到此错误。

建议使用tensorflow.keras.datasets,请参阅下面的代码

import tensorflow as tf
(train_images, train_labels), (test_images, test_labels) = tf.keras.datasets.mnist.load_data()

有关更多详细信息,请参阅本

感谢您的回答。

我想使用examples的minist函数,但没有办法使用它。。

最新更新