caffe 調試 cascade網絡時 no matching function for call to ‘caffe::Net ::Net()’


這是由於在net.hpp中缺少net的無參數構造函數,所以添加默認構造函數即可。

class Net {
 public:
  explicit Net();
  explicit Net(const NetParameter& param, const Net* root_net = NULL);
  explicit Net(const string& param_file, Phase phase,
      const int level = 0, const vector<string>* stages = NULL,
      const Net* root_net = NULL);
  virtual ~Net() {}
....
}

net.cpp中添加以下代碼

namespace caffe {
template <typename Dtype>
Net<Dtype>::Net()
    : root_net_(NULL) {
}

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM