caffe Check failed: mdb_status == 0 (2 vs. 0) No such file or directory

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/axiqia/article/details/79974461
  • 错误提示:Check failed: mdb_status == 0 (2 vs. 0) No such file or directory,创建数据层mnist是找不到mdb文件
I0417 13:28:17.764714 35030 layer_factory.hpp:77] Creating layer mnist
F0417 13:28:17.765067 35030 db_lmdb.hpp:15] Check failed: mdb_status == 0 (2 vs. 0) No such file or directory
*** Check failure stack trace: ***
    @     0x7f8be82acd3d  google::LogMessage::Fail()
    @     0x7f8be82aeb53  google::LogMessage::SendToLog()
    @     0x7f8be82ac8cb  google::LogMessage::Flush()
    @     0x7f8be82af53e  google::LogMessageFatal::~LogMessageFatal()
    @     0x7f8be88df8e8  caffe::db::LMDB::Open()
    @     0x7f8be898643f  caffe::DataLayer<>::DataLayer()
    @     0x7f8be89865d2  caffe::Creator_DataLayer<>()
    @     0x7f8be8a66209  caffe::Net<>::Init()
    @     0x7f8be8a6959a  caffe::Net<>::Net()
    @           0x40c404  time()
    @           0x407440  main
    @     0x7f8be7564830  __libc_start_main
    @           0x407d89  _start
  • 解决办法
cd $CAFFE_ROOT
./data/mnist/get_mnist.sh
./examples/mnist/create_mnist.sh

After running the script there should be two datasets,mnist_train_lmdb, and mnist_test_lmdb.


Data Layers

Data enters Caffe through data layers: they lie at the bottom of nets. Data can come from efficient databases (LevelDB or LMDB), directly from memory, or, when efficiency is not critical, from files on disk in HDF5 or common image formats.

Common input preprocessing (mean subtraction, scaling, random cropping, and mirroring) is available by specifying TransformationParameters by some of the layers. The bias, scale, and crop layers can be helpful with transforming the inputs, when TransformationParameter isn’t available.

Layers:

  • Image Data - read raw images.
  • Database - read data from LEVELDB or LMDB.
  • HDF5 Input - read HDF5 data, allows data of arbitrary dimensions.
  • HDF5 Output - write data as HDF5.
  • Input - typically used for networks that are being deployed.
  • Window Data - read window data file.
  • Memory Data - read data directly from memory.
  • Dummy Data - for static data and debugging.

Note that the Python Layer can be useful for create custom data layers.

猜你喜欢

转载自blog.csdn.net/axiqia/article/details/79974461