带有数据预处理的neuralnetwork_turial.lua问题

带有数据预处理的neuralnetwork_turial.lua问题,lua,mnist,torch,Lua,Mnist,Torch,我首先使用git clone-ing安装了,后来使用luarocks make安装成功。require'dp'在火炬提示下运行良好 但是当我尝试执行(th neuralnetwork\u tutorial.lua)时,它抛出以下错误 Tanny @neuralnetwork_tutorial.lua: About to initiate: datasource = dp.Mnist{input_preprocess = dp.Standardize()} Tanny @/home/ubuntu/

我首先使用
git clone
-ing安装了,后来使用
luarocks make
安装成功。
require'dp'
在火炬提示下运行良好

但是当我尝试执行(
th neuralnetwork\u tutorial.lua
)时,它抛出以下错误

Tanny @neuralnetwork_tutorial.lua: About to initiate: datasource = dp.Mnist{input_preprocess = dp.Standardize()}
Tanny @/home/ubuntu/binaries/torches/torch/install/share/lua/5.1/dp/preprocess/standardize.lua: Marked presence!!!
Tanny @/home/ubuntu/binaries/torches/torch/install/share/lua/5.1/dp/torch/File.lua says: @177 typeidx=  3
Tanny @/home/ubuntu/binaries/torches/torch/install/share/lua/5.1/dp/torch/File.lua says: @177 typeidx=  1
Tanny @/home/ubuntu/binaries/torches/torch/install/share/lua/5.1/dp/torch/File.lua says: @177 typeidx=  4
Tanny @/home/ubuntu/binaries/torches/torch/install/share/lua/5.1/dp/torch/File.lua says: @177 typeidx=  0
Tanny @/home/ubuntu/binaries/torches/torch/install/share/lua/5.1/dp/torch/File.lua says: @177 typeidx=  28
Tanny @/home/ubuntu/binaries/torches/torch/install/share/lua/5.1/dp/torch/File.lua says: @259 typeidx=  28
/home/ubuntu/binaries/torches/torch/install/bin/luajit: ...aries/torches/torch/install/share/lua/5.1/torch/File.lua:260: unknown object
stack traceback:
        [C]: in function 'error'
        ...aries/torches/torch/install/share/lua/5.1/torch/File.lua:260: in function 'readObject'
        ...aries/torches/torch/install/share/lua/5.1/torch/File.lua:252: in function 'readObject'
        ...aries/torches/torch/install/share/lua/5.1/torch/File.lua:277: in function 'loadData'
        ...es/torches/torch/install/share/lua/5.1/dp/data/mnist.lua:74: in function 'loadTrainValid'
        ...es/torches/torch/install/share/lua/5.1/dp/data/mnist.lua:61: in function '__init'
        ...aries/torches/torch/install/share/lua/5.1/torch/init.lua:50: in function <...aries/torches/torch/install/share/lua/5.1/torch/init.lua:46>
        [C]: in function 'Mnist'
        neuralnetwork_tutorial.lua:16: in main chunk
        [C]: in function 'dofile'
        ...ches/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
        [C]: at 0x0804d650
Tanny@neuralnetwork\u tutorial.lua:即将启动:datasource=dp.Mnist{input\u preprocess=dp.standarized()}
Tanny@/home/ubuntu/binaries/torches/torch/install/share/lua/5.1/dp/preprocess/standarding.lua:标记存在!!!
Tanny@/home/ubuntu/binaries/torches/torch/install/share/lua/5.1/dp/torch/File.lua说:@177 typeidx=3
Tanny@/home/ubuntu/binaries/torches/torch/install/share/lua/5.1/dp/torch/File.lua说:@177 typeidx=1
Tanny@/home/ubuntu/binaries/torches/torch/install/share/lua/5.1/dp/torch/File.lua说:@177 typeidx=4
Tanny@/home/ubuntu/binaries/torches/torch/install/share/lua/5.1/dp/torch/File.lua说:@177 typeidx=0
Tanny@/home/ubuntu/binaries/torches/torch/install/share/lua/5.1/dp/torch/File.lua说:@177 typeidx=28
Tanny@/home/ubuntu/binaries/torches/torch/install/share/lua/5.1/dp/torch/File.lua说:@259typeidx=28
/home/ubuntu/binaries/torches/torch/install/bin/luajit:…aries/torches/torch/install/share/lua/5.1/torch/File.lua:260:未知对象
堆栈回溯:
[C] :在函数“error”中
…aries/torches/torch/install/share/lua/5.1/torch/File.lua:260:在函数“readObject”中
…aries/torches/torch/install/share/lua/5.1/torch/File.lua:252:在函数“readObject”中
…aries/torches/torch/install/share/lua/5.1/torch/File.lua:277:在函数“loadData”中
…es/torches/torch/install/share/lua/5.1/dp/data/mnist.lua:74:在函数“loadTrainValid”中
…es/torches/torch/install/share/lua/5.1/dp/data/mnist.lua:61:在函数“初始化”中
…aries/torches/torch/install/share/lua/5.1/torch/init.lua:50:in功能
[C] :在函数“Mnist”中
neuralnetwork_教程。lua:16:在主块中
[C] :在函数“dofile”中
…ches/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:131:在主块中
[C] :在0x0804d650处
我在这些脚本中放入了一些
print
语句来理解流程。我碰巧注意到,获取对象后的第一步是确定对象的类型;其中8个已经申报。类型已通过0到7声明,0为
TYPE\u NIL
。但是,该代码失败,因为它检测到类型28(??)

请问我哪里出了问题?或者从哪里寻找问题


注意:脚本自行下载数据,但由于某些标准公司代理设置问题,无法下载。因此,我亲自下载了数据并将其存储在特定的数据目录中。如果这可能是一个线索???

好的,那么这是代码中的一个bug(序列化的MNIST不是跨平台的)。通过使用ascii格式而不是二进制格式序列化数据集解决了此问题。

me也面临同样的问题,即使是
Mnist
数据也是由script@jerith2:嗯,数据集本身可能已损坏…使用notMNIST数据集,目前面临一些与内存相关的问题,将进行整理并让您知道。在此之前,如果您对任何数据集得出任何结论,请务必让我知道。dp.Mnist数据源刚刚更新为使用ascii格式而不是二进制。希望这能解决你的问题。重新安装dp:sudo luarocks安装dp并重试脚本。手动下载:wget-Thank@NicholasLeonard,它像一个魔咒一样工作!!嘿,还需要一个帮助,你介意回答这个问题吗