我是一个初学者,并试图使用google来练习张量流。当我试图导入张量流中的内置数据集(Mnist)时,我得到了以下错误。
许多用户在笔记本电脑上也有同样的问题。我使用Google Colab来利用免费资源。
代码片段:
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data", one_hot=True)错误:
ModuleNotFoundError Traceback (most recent
call last) <ipython-input-4-4e25ee396bc7> in <module>() ----> 1
from tensorflow.examples.tutorials.mnist import input_data
2 mnist = input_data.read_data_sets("MNIST_data", one_hot=True)
ModuleNotFoundError: No module named
'tensorflow.examples.tutorials'请有人指导我解决这个错误。
谢谢
发布于 2022-02-07 08:27:58
在顶部写!pip install mnist。使用import mnist。
然后简单地存储图像和标签:
train_images = mnist.train_images()
train_labels = mnist.train_labels()
test_images = mnist.test_images()
test_labels = mnist.test_labels()就这样!
发布于 2020-07-12 10:16:07
<html>
<body>
<div align="center"><p>I can't do that either</p></div>
<style>
@import url("https://fonts.googleapis.com/css?family=Raleway:400,400i,700");
div {
width : 400px;
height : 60px;
background-color : rgb(100,100,255);
border : 1px solid rgb(100,100,255);
box-shadow : 0 0 20px black;
border-radius : 24px;
font-family : Raleway, sans-serif;
transition : 1s;
text-align : center;
}
div:hover{
width : 420px;
height : 80px;
}
p{
margin-right : 20px;
color : white;
}
</style>
</body>
</html>
https://stackoverflow.com/questions/62210186
复制相似问题