關於caffe-windows中 compute_image_mean.exe出現的問題

來源:互聯網
上載者:User

標籤:caffe windows matlab   compute_image_mean   caffe   


這兩天有興緻裝了下caffe,感受下這個架構。

但是在這個過程中遇到很多問題,我把碰到的問題和解決方案寫下,便於後人快速上手。



compute_image_mean.exe 編譯出來後,執行資料變換時,出現的情況。


隨後,迅速到網上尋找相關資訊。

看到了下面這篇部落格,關於leveldb 的

http://blog.csdn.net/cywosp/article/details/20746879

裡面有段話是這麼說的:

在1.15版本中,如果使用NewIterator函數建立了leveldb::Iterator對象而沒有delete該對象的話,在程式退出時將會報出如下錯誤:
    db/version_set.cc:806: leveldb::VersionSet::~VersionSet(): Assertion `dummy_versions_.next_ == &dummy_versions_‘ failed.
    根據程式碼分析,這裡assert失敗的原因主要是為了防止記憶體泄露。


然後,就開啟編譯的源碼(在/tools/compute_image_mean.cpp裡面)

根據部落格的提示,我就在建立lterator後進行delete。大概在原始碼的第70行左右的位置。

    ++count;    if (count % 10000 == 0) {      LOG(ERROR) << "Processed " << count << " files.";    }  }  delete it;  if (count % 10000 != 0) {    LOG(ERROR) << "Processed " << count << " files.";  }  for (int i = 0; i < sum_blob.data_size(); ++i) {    sum_blob.set_data(i, sum_blob.data(i) / count);  }

修改後再編譯,然後就可以順利跑通了。










關於caffe-windows中 compute_image_mean.exe出現的問題

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.