难道`No such file or directory`只能表示没有`No such file or directory`吗?
Can `No such file or directory` only mean that there is `No such file or directory`?
我正在尝试使用 caffe 训练网络,但遇到找不到文件的异常:
I0111 11:19:27.339706 5151 layer_factory.hpp:76] Creating layer data
I0111 11:19:27.340117 5151 net.cpp:106] Creating Layer data
I0111 11:19:27.340126 5151 net.cpp:411] data -> data
I0111 11:19:27.340154 5151 net.cpp:411] data -> label
I0111 11:19:27.340165 5151 data_transformer.cpp:25] Loading mean file from: /home/myUser/Documents/code/RFNN/data/ILSVRC2012/10class/imagenet_mean_10biggest.binaryproto
F0111 11:19:27.340873 5157 db_lmdb.hpp:14] Check failed: mdb_status == 0 (2 vs. 0) No such file or directory
*** Check failure stack trace: ***
@ 0x7f7f1c8f35cd google::LogMessage::Fail()
@ 0x7f7f1c8f5433 google::LogMessage::SendToLog()
@ 0x7f7f1c8f315b google::LogMessage::Flush()
@ 0x7f7f1c8f5e1e google::LogMessageFatal::~LogMessageFatal()
@ 0x7f7f1d032532 caffe::db::LMDB::Open()
@ 0x7f7f1cfe9966 caffe::DataReader::Body::InternalThreadEntry()
@ 0x7f7f1cfdfc25 caffe::InternalThread::entry()
@ 0x7f7f127285d5 (unknown)
@ 0x7f7f11fd66ba start_thread
@ 0x7f7f1be6c82d clone
@ (nil) (unknown)
Aborted (core dumped)
可能有各种各样的原因导致错误,但似乎确实存在这个特定文件。我已经将路径更改为绝对路径,检查了拼写(在这个确切的文件夹中确实有一个具有这个确切名称的文件)并仔细检查了文件的读写权限。
当文件看起来确实存在时,困难在于找到此错误的原因。我的意思是,还有什么可能是原因?
所以我的问题是:有人知道这个错误的原因是什么吗?
编辑:根据要求,ls -ltrh /home/myUser/Documents/code/RFNN/data/ILSVRC2012/10class/imagenet_mean_10biggest.binaryproto
的输出:
-rwxrwxr-x 1 myUser myUser 769K jan 10 16:39 /home/myUser/Documents/code/RFNN/data/ILSVRC2012/10class/imagenet_mean_10biggest.binaryproto
我假设 prototxt 文件的相关部分是:
name: "rfnn_ILSVRC2012_Small"
layer {
top: "data"
top: "label"
name: "data"
type: "Data"
data_param {
source: "/home/myUser/Documents/code/RFNN/data/ILSVRC2012/10class/ilsvrc12_train_lmdb_10biggest"
backend: LMDB
batch_size: 32
}
transform_param {
crop_size: 224
mirror: true
mean_file: "/home/myUser/Documents/code/RFNN/data/ILSVRC2012/10class
/imagenet_mean_10biggest.binaryproto"
}
include: { phase: TRAIN }
}
layer {
top: "data"
top: "label"
name: "data"
type: "Data"
data_param {
source: "/home/myUser/Documents/code/RFNN/data/ILSVRC2012/10class/ilsvrc12_val_lmdb_10biggest"
backend: LMDB
batch_size: 32
}
transform_param {
crop_size: 224
mirror: false
mean_file: "/home/myUser/Documents/code/RFNN/data/ILSVRC2012/10class/imagenet_mean_10biggest.binaryproto"
}
include: { phase: TEST }
}
你的 mean 文件确实存在,但这不是 caffe 抱怨的。
你的数据库文件 '/home/myUser/Documents/code/RFNN/data/ILSVRC2012/10class/ilsvrc12_train_lmdb_10biggest'
怎么样?它在正确的位置吗?
TL;DR
Can No such file or directory
only mean that there is No such file or directory
?
是的。
我正在尝试使用 caffe 训练网络,但遇到找不到文件的异常:
I0111 11:19:27.339706 5151 layer_factory.hpp:76] Creating layer data
I0111 11:19:27.340117 5151 net.cpp:106] Creating Layer data
I0111 11:19:27.340126 5151 net.cpp:411] data -> data
I0111 11:19:27.340154 5151 net.cpp:411] data -> label
I0111 11:19:27.340165 5151 data_transformer.cpp:25] Loading mean file from: /home/myUser/Documents/code/RFNN/data/ILSVRC2012/10class/imagenet_mean_10biggest.binaryproto
F0111 11:19:27.340873 5157 db_lmdb.hpp:14] Check failed: mdb_status == 0 (2 vs. 0) No such file or directory
*** Check failure stack trace: ***
@ 0x7f7f1c8f35cd google::LogMessage::Fail()
@ 0x7f7f1c8f5433 google::LogMessage::SendToLog()
@ 0x7f7f1c8f315b google::LogMessage::Flush()
@ 0x7f7f1c8f5e1e google::LogMessageFatal::~LogMessageFatal()
@ 0x7f7f1d032532 caffe::db::LMDB::Open()
@ 0x7f7f1cfe9966 caffe::DataReader::Body::InternalThreadEntry()
@ 0x7f7f1cfdfc25 caffe::InternalThread::entry()
@ 0x7f7f127285d5 (unknown)
@ 0x7f7f11fd66ba start_thread
@ 0x7f7f1be6c82d clone
@ (nil) (unknown)
Aborted (core dumped)
可能有各种各样的原因导致错误,但似乎确实存在这个特定文件。我已经将路径更改为绝对路径,检查了拼写(在这个确切的文件夹中确实有一个具有这个确切名称的文件)并仔细检查了文件的读写权限。
当文件看起来确实存在时,困难在于找到此错误的原因。我的意思是,还有什么可能是原因?
所以我的问题是:有人知道这个错误的原因是什么吗?
编辑:根据要求,ls -ltrh /home/myUser/Documents/code/RFNN/data/ILSVRC2012/10class/imagenet_mean_10biggest.binaryproto
的输出:
-rwxrwxr-x 1 myUser myUser 769K jan 10 16:39 /home/myUser/Documents/code/RFNN/data/ILSVRC2012/10class/imagenet_mean_10biggest.binaryproto
我假设 prototxt 文件的相关部分是:
name: "rfnn_ILSVRC2012_Small"
layer {
top: "data"
top: "label"
name: "data"
type: "Data"
data_param {
source: "/home/myUser/Documents/code/RFNN/data/ILSVRC2012/10class/ilsvrc12_train_lmdb_10biggest"
backend: LMDB
batch_size: 32
}
transform_param {
crop_size: 224
mirror: true
mean_file: "/home/myUser/Documents/code/RFNN/data/ILSVRC2012/10class
/imagenet_mean_10biggest.binaryproto"
}
include: { phase: TRAIN }
}
layer {
top: "data"
top: "label"
name: "data"
type: "Data"
data_param {
source: "/home/myUser/Documents/code/RFNN/data/ILSVRC2012/10class/ilsvrc12_val_lmdb_10biggest"
backend: LMDB
batch_size: 32
}
transform_param {
crop_size: 224
mirror: false
mean_file: "/home/myUser/Documents/code/RFNN/data/ILSVRC2012/10class/imagenet_mean_10biggest.binaryproto"
}
include: { phase: TEST }
}
你的 mean 文件确实存在,但这不是 caffe 抱怨的。
你的数据库文件 '/home/myUser/Documents/code/RFNN/data/ILSVRC2012/10class/ilsvrc12_train_lmdb_10biggest'
怎么样?它在正确的位置吗?
TL;DR
Can
No such file or directory
only mean that there isNo such file or directory
?
是的。