首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >来自tensorflow.examples.tutorials.mnist没有在Google工作

来自tensorflow.examples.tutorials.mnist没有在Google工作
EN

Stack Overflow用户
提问于 2020-06-05 07:25:40
回答 2查看 768关注 0票数 0

我是一个初学者,并试图使用google来练习张量流。当我试图导入张量流中的内置数据集(Mnist)时,我得到了以下错误。

许多用户在笔记本电脑上也有同样的问题。我使用Google Colab来利用免费资源。

代码片段:

代码语言:javascript
复制
import tensorflow as tf
 from tensorflow.examples.tutorials.mnist import input_data
 mnist = input_data.read_data_sets("MNIST_data", one_hot=True)

错误:

代码语言:javascript
复制
     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'

请有人指导我解决这个错误。

谢谢

EN

回答 2

Stack Overflow用户

发布于 2022-02-07 08:27:58

在顶部写!pip install mnist。使用import mnist

然后简单地存储图像和标签:

代码语言:javascript
复制
train_images = mnist.train_images() 
train_labels = mnist.train_labels()
test_images = mnist.test_images()
test_labels = mnist.test_labels()

就这样!

票数 0
EN

Stack Overflow用户

发布于 2020-07-12 10:16:07

代码语言:javascript
复制
<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>

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62210186

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档