------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------------------------------------

Q1. compile caffe .cpp file ,   come out an error :

d302@d302-MS-7816-04:~/wangxiao/spl-caffe-master$ make -j8
NVCC src/caffe/layers/euclidean_loss_layer.cu
src/caffe/layers/euclidean_loss_layer.cu(43): error: a value of type "const float *" cannot be used to initialize an entity of type "float *"
          detected during instantiation of "void caffe::EuclideanLossLayer<Dtype>::Backward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<__nv_bool, std::allocator<__nv_bool>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=float]"
(105): here

the original code is :

             Dtype* diff_cpu_data = bottom[i]->mutable_cpu_diff();
const Dtype* label_data = bottom[]->cpu_data(); // label data: 0 or 1
const Dtype* predict_data = bottom[]->cpu_data(); // predict data int spl_num = ;
int al_num = ; for(int id = ; id < bottom[i]->count(); ++id) { // 35*12=420 // Self Paced Learning
if (label_data[id]==){
// negative samples ... do nothing
}
else{
if(predict_data[id]>0.7 && label_data[id]== ) {
spl_num ++ ;
// if the condition is met, transmit the gradient
// else make the gradient equal to zero...
}
else {
diff_cpu_data[id] = ;
// bottom[i]->mutable_cpu_diff()[id] = 0;
}
} // Active Learning
if (0.4 < predict_data[id] && predict_data[id] < 0.5){ if (label_data[id] == ){ predict_data[id] = ;
}else
if (label_data[id] == ){
predict_data[id] = ;
} al_num++; }

Solution 1: No solution, because the char* can not give to const char*, and the value of const char* can not be changed .  and in my problem, we don't need change the predict score at all.

------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------------------------------------

Q2. when trained a AlexNet caffe model, and use the Matlab Interface to extract Features or predicted Scores , However it tell me errors like the following :

d302@d302-MS-7816-04:~$ matlab
libprotobuf ERROR google/protobuf/text_format.cc:172] Error parsing text-format caffe.NetParameter: 339:2: Expected identifier.
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0116 15:34:34.112346 25564 upgrade_proto.cpp:928] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: ../../models/bvlc_alexnet/alex_hat_deploy.prototxt
*** Check failure stack trace: ***
Killed


Solution 2: layer 6 was repaired when I train my model , i.e.

layer {
  name: "fc6_wx"
  type: "InnerProduct"
  bottom: "pool5"
  top: "fc6_wx"
  param {
    lr_mult: 1
    decay_mult: 1
  }
  param {
    lr_mult: 2
    decay_mult: 0
  }
  inner_product_param {
    num_output: 4096
    weight_filler {
      type: "gaussian"
      std: 0.005
    }
    bias_filler {
      type: "constant"
      value: 0.1
    }
  }
}

change the name: "fc6_wx"  into name: "fc6", and it will be OK .

------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------------------------------------

最新文章

  1. 后缀数组:倍增法和DC3的简单理解
  2. mac pro在公司连WiFi正常,回家回宿舍就找不到WiFI信号,需要重启才能找到WiFI热点
  3. 继承多态绕点 Java篇
  4. Asp.Net MVC 使用FileResult导出Excel数据文件
  5. TatukGIS - GisDefs - ChangeDir 函数
  6. Altera quartus II遇到的问题
  7. 表单验证的3个函数ISSET()、empty()、is_numeric()的使用方法
  8. C语言之函数的声明
  9. Ubuntu安装Nginx+PHP7.0.4+MySQL5.6
  10. Spring MVC 中获取session的几种方法
  11. 戴建钊 201521123023《Java程序设计》第2周学习总结
  12. Myexclipse创建Junit测试
  13. python8--文件操作 with。。。open语法
  14. HttpClient 通过代理访问验证服务器
  15. Fiddler模拟低速网络
  16. Java框架之Struts2(五)
  17. Microsoft Office MIME Types
  18. 使用djcelery发送邮件
  19. Java ConcurrentHashMap (Java代码实战-005)
  20. PHP调用mysql函数整理

热门文章

  1. SQL Server 2008 定时作业的制定(SQL2005参考此方法) 转
  2. 《JAVA学习笔记(1---13-4)》
  3. hdu1394
  4. jQuery 关于 end() 方法的详细解释
  5. php大力力 [003节]php在百度文库的几个基础教程mac环境下文本编辑工具
  6. Code is not literature
  7. Python入门(四,高级)
  8. ubuntu系统安装mongodb
  9. IOS 使用block完成网络请求的自定义类BlockURLConnection
  10. 负margin居中