<legend id='SXNeU'><style id='SXNeU'><dir id='SXNeU'><q id='SXNeU'></q></dir></style></legend>

    <small id='SXNeU'></small><noframes id='SXNeU'>

    <tfoot id='SXNeU'></tfoot>
  1. <i id='SXNeU'><tr id='SXNeU'><dt id='SXNeU'><q id='SXNeU'><span id='SXNeU'><b id='SXNeU'><form id='SXNeU'><ins id='SXNeU'></ins><ul id='SXNeU'></ul><sub id='SXNeU'></sub></form><legend id='SXNeU'></legend><bdo id='SXNeU'><pre id='SXNeU'><center id='SXNeU'></center></pre></bdo></b><th id='SXNeU'></th></span></q></dt></tr></i><div id='SXNeU'><tfoot id='SXNeU'></tfoot><dl id='SXNeU'><fieldset id='SXNeU'></fieldset></dl></div>
      • <bdo id='SXNeU'></bdo><ul id='SXNeU'></ul>

      无法加载 CIFAR-10 数据集:加载键“x1f"无效

      Unable to load CIFAR-10 dataset: Invalid load key #39;x1f#39;(无法加载 CIFAR-10 数据集:加载键“x1f无效)
          <tbody id='nkzbn'></tbody>

        1. <small id='nkzbn'></small><noframes id='nkzbn'>

          1. <i id='nkzbn'><tr id='nkzbn'><dt id='nkzbn'><q id='nkzbn'><span id='nkzbn'><b id='nkzbn'><form id='nkzbn'><ins id='nkzbn'></ins><ul id='nkzbn'></ul><sub id='nkzbn'></sub></form><legend id='nkzbn'></legend><bdo id='nkzbn'><pre id='nkzbn'><center id='nkzbn'></center></pre></bdo></b><th id='nkzbn'></th></span></q></dt></tr></i><div id='nkzbn'><tfoot id='nkzbn'></tfoot><dl id='nkzbn'><fieldset id='nkzbn'></fieldset></dl></div>

              <tfoot id='nkzbn'></tfoot>
            • <legend id='nkzbn'><style id='nkzbn'><dir id='nkzbn'><q id='nkzbn'></q></dir></style></legend>
                <bdo id='nkzbn'></bdo><ul id='nkzbn'></ul>
                本文介绍了无法加载 CIFAR-10 数据集:加载键“x1f"无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我目前正在使用 TensorFlow 中的一些神经网络 - 我决定尝试使用 CIFAR-10 数据集.我从网站下载了CIFAR-10 python"数据集:https://www.cs.toronto.edu/~kriz/cifar.html.

                I'm currently playing around with some neural networks in TensorFlow - I decided to try working with the CIFAR-10 dataset. I downloaded the "CIFAR-10 python" dataset from the website: https://www.cs.toronto.edu/~kriz/cifar.html.

                在 Python 中,我也尝试直接复制提供的用于加载数据的代码:

                In Python, I also tried directly copying the code that is provided to load the data:

                def unpickle(file):
                import pickle
                with open(file, 'rb') as fo:
                    dict = pickle.load(fo, encoding='bytes')
                return dict
                

                但是,当我运行它时,我最终得到以下错误:_pickle.UnpicklingError: invalid load key, 'x1f'. 我也尝试使用 gzip 模块打开文件(with gzip.open(file, 'rb') as fo:),但这也不起作用.

                However, when I run this, I end up with the following error: _pickle.UnpicklingError: invalid load key, 'x1f'. I've also tried opening the file using the gzip module (with gzip.open(file, 'rb') as fo:), but this didn't work either.

                是数据集很糟糕,还是代码有问题?如果数据集不好,我在哪里可以获得适合 CIFAR-10 的数据集?

                Is the dataset simply bad, or this an issue with code? If the dataset's bad, where can I obtain the proper dataset for CIFAR-10?

                推荐答案

                解压你的 *.gz 文件并使用这段代码

                Extract your *.gz file and use this code

                from six.moves import cPickle
                f = open("path/data_batch_1", 'rb')
                datadict = cPickle.load(f,encoding='latin1')
                f.close()
                X = datadict["data"]
                Y = datadict['labels']
                

                这篇关于无法加载 CIFAR-10 数据集:加载键“x1f"无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Adding config modes to Plotly.Py offline - modebar(将配置模式添加到 Plotly.Py 离线 - 模式栏)
                Plotly: How to style a plotly figure so that it doesn#39;t display gaps for missing dates?(Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙?)
                python save plotly plot to local file and insert into html(python将绘图保存到本地文件并插入到html中)
                Plotly: What color cycle does plotly express follow?(情节:情节表达遵循什么颜色循环?)
                How to save plotly express plot into a html or static image file?(如何将情节表达图保存到 html 或静态图像文件中?)
                Plotly: How to make a line plot from a pandas dataframe with a long or wide format?(Plotly:如何使用长格式或宽格式的 pandas 数据框制作线图?)

                <small id='Hb3Hb'></small><noframes id='Hb3Hb'>

              • <i id='Hb3Hb'><tr id='Hb3Hb'><dt id='Hb3Hb'><q id='Hb3Hb'><span id='Hb3Hb'><b id='Hb3Hb'><form id='Hb3Hb'><ins id='Hb3Hb'></ins><ul id='Hb3Hb'></ul><sub id='Hb3Hb'></sub></form><legend id='Hb3Hb'></legend><bdo id='Hb3Hb'><pre id='Hb3Hb'><center id='Hb3Hb'></center></pre></bdo></b><th id='Hb3Hb'></th></span></q></dt></tr></i><div id='Hb3Hb'><tfoot id='Hb3Hb'></tfoot><dl id='Hb3Hb'><fieldset id='Hb3Hb'></fieldset></dl></div>

                  <tbody id='Hb3Hb'></tbody>
                  <tfoot id='Hb3Hb'></tfoot>
                1. <legend id='Hb3Hb'><style id='Hb3Hb'><dir id='Hb3Hb'><q id='Hb3Hb'></q></dir></style></legend>
                    <bdo id='Hb3Hb'></bdo><ul id='Hb3Hb'></ul>