title: caffe: Check failed: cv_img.data Could not load
body: <p>I use python to train a caffe net but meet an error:</p>
  
  <pre><code>I0717 11:05:32.177762  8677 solver.cpp:218] Iteration 0 (0 iter/s, 0.178244s/20 iters), loss = 363409
  I0717 11:05:32.177825  8677 solver.cpp:237]     Train net output #0: loss = 363409 (* 1 = 363409 loss)
  I0717 11:05:32.177922  8677 solver.cpp:237]     Train net output #1: tmpl = 0
  I0717 11:05:32.178000  8677 solver.cpp:237]     Train net output #2: tmpo = 0
  I0717 11:05:32.178014  8677 sgd_solver.cpp:105] Iteration 0, lr = 1e-10
  E0717 11:05:32.186724  8703 io.cpp:80] Could not open or find file 
  F0717 11:05:32.186736  8703 image_data_layer.cpp:129] Check failed: cv_img.data Could not load 
  *** Check failure stack trace: ***
  Aborted (core dumped)
  </code></pre>
  
  <p>here is the data layer of my net:</p>
  
  <pre><code>layer {
    name: "data"
    type: "ImageData"
    top: "data"
    top: "tmpo"
    image_data_param {
      is_color: false
      source: "/home/muses/fcn-master/mo/train_o.txt"
      batch_size: 1               
      shuffle: false
    }
  } 
  
  layer {
    name: "label"
    type: "ImageData"
    top: "label"
    top: "tmpl"
    image_data_param {
      is_color: false
      source: "/home/muses/fcn-master/mo/train_l.txt"
      batch_size: 1               
      shuffle: false
    }
  }  
  </code></pre>
  
  <p>train_l.txt:
  (train_o.txt is about the same to this file)</p>
  
  <pre><code>/home/muses/fcn-master/data/vessel/train/label/01.png 0
  /home/muses/fcn-master/data/vessel/train/label/02.png 0
  /home/muses/fcn-master/data/vessel/train/label/03.png 0
  /home/muses/fcn-master/data/vessel/train/label/04.png 0
  /home/muses/fcn-master/data/vessel/train/label/05.png 0
  /home/muses/fcn-master/data/vessel/train/label/06.png 0
  /home/muses/fcn-master/data/vessel/train/label/07.png 0
  /home/muses/fcn-master/data/vessel/train/label/08.png 0
  /home/muses/fcn-master/data/vessel/train/label/09.png 0
  /home/muses/fcn-master/data/vessel/train/label/10.png 0
  /home/muses/fcn-master/data/vessel/train/label/11.png 0
  /home/muses/fcn-master/data/vessel/train/label/12.png 0
  /home/muses/fcn-master/data/vessel/train/label/13.png 0
  </code></pre>
  
  <p>I have checked that the file path is correct.All files are edited under ubuntu14.04.
  THEN I modified the 80th line of io.cpp,try to print the wrong filename like this:</p>
  
  <pre><code>if (!cv_img_origin.data) {
      LOG(INFO) &lt;&lt; "FILENAME: " &lt;&lt; filename;
      LOG(INFO) &lt;&lt; "cv_read_flag: " &lt;&lt; cv_read_flag;
      LOG(ERROR) &lt;&lt; "Could not open or find file " &lt;&lt; filename;
      return cv_img_origin;
    }
  </code></pre>
  
  <p>the error comes to:</p>
  
  <pre><code>I0718 10:17:13.220021 18611 io.cpp:80] FILENAME: 
  I0718 10:17:13.220058 18611 io.cpp:81] cv_read_flag: 0
  E0718 10:17:13.220062 18611 io.cpp:82] Could not open or find file 
  F0718 10:17:13.220067 18611 image_data_layer.cpp:129] Check failed: cv_img.data Could not load 
  </code></pre>
  
  <p>I can not figure out why the error comes out.
  thank you very much if you know the reason.</p>