【发布时间】:2016-05-08 01:01:26
【问题描述】:
我正在测试斯坦福 NLP 提供的代码,并按照https://github.com/stanfordnlp/treelstm 中的说明进行操作
但是,当我测试这个th sentiment/main.lua -m constituency -b
我收到了这个错误:
--------------------------------------------------------------------------------
Constituency Tree LSTM for Sentiment Classification
--------------------------------------------------------------------------------
/Users/Solomon/torch/install/bin/luajit:
/Users/Solomon/Downloads/treelstm-master/util/Vocab.lua:19:
attempt to index local 'file' (a nil value)
>stack traceback:
/Users/Solomon/Downloads/treelstm-master/util/Vocab.lua:19: in function '__init'
/Users/Solomon/torch/install/share/lua/5.1/torch/init.lua:91: in function </Users/Solomon/torch/install/share/lua/5.1/torch/init.lua:87>
[C]: in function 'Vocab'
sentiment/main.lua:48: in main chunk
[C]: in function 'dofile'
...omon/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x0104141d50
它是在 OSX Yosemite 下运行的,花了好几个小时却搞不清楚。我对这些东西很陌生,有人知道出了什么问题吗?
【问题讨论】:
-
读取错误
attempt to index local file (a nil value)和来源Vocab.lua。我敢打赌你忘了设置一些配置来指定词汇文件的路径。
标签: macos lua stanford-nlp lstm