装好了caffe,想跑一个mnist的数据集,但是在转换成LMDB时出现问题,问题如下:

[email protected]:~/caffe$ sudo sh examples/mnist/create_mnist.sh 
Creating lmdb...
F0422 22:45:35.072829 84051 convert_mnist_data.cpp:48] Check failed: image_file Unable to open file data/mnist/train-images-idx3-ubyte
*** Check failure stack trace: ***
    @     0x7fc92ad135cd  google::LogMessage::Fail()
    @     0x7fc92ad15433  google::LogMessage::SendToLog()
    @     0x7fc92ad1315b  google::LogMessage::Flush()
    @     0x7fc92ad15e1e  google::LogMessageFatal::~LogMessageFatal()
    @           0x40328a  convert_dataset()
    @           0x40228a  main
    @     0x7fc929e87830  __libc_start_main
    @           0x4022d9  _start
    @              (nil)  (unknown)
Aborted (core dumped)

怎么回事呢?

笔者顺着指令打开了examples/mnist下的create_mnist.sh文件:原来是名字不一样导致的:

create_mnist.sh里写的是:Check failed: image_file Unable to open file data/mnist/train-images-idx3-ubyte

而实际我们的文件为:

Check failed: image_file Unable to open file data/mnist/train-images-idx3-ubyte

我们按照create_mnist.sh里的文件命名将数据集里的.(点号)改成-(短线),如下:

Check failed: image_file Unable to open file data/mnist/train-images-idx3-ubyte

再次输入命令:sudo sh examples/mnist/create_mnist.sh 

Check failed: image_file Unable to open file data/mnist/train-images-idx3-ubyte

成功啦,caffe真的是一步一个坑。
 

相关文章:

  • 2022-12-23
  • 2021-12-22
  • 2021-10-17
  • 2021-06-26
  • 2021-06-29
猜你喜欢
  • 2022-12-23
  • 2021-10-17
  • 2022-12-23
  • 2022-01-10
  • 2021-12-05
  • 2021-07-31
  • 2021-07-25
相关资源
相似解决方案