在caffe.proto中定义变量出现“'xxxParameter' has no member named 'xxx'”问题的解决
2017-09-27 11:14
776 查看
在caffe.proto中某一message添加成员变量时,最好避免使用大写字母。在编译过程中message里的成员变量名会自动将所有字母变为小写。如果在C++代码中仍然使用带有大写字母的变量时则会产生找不到定义的问题。
例如,在caffe.proto中的AccuracyParameter定义:
且在C++代码中使用的是:
则会出现’AccuracyParameter’ has no member named ‘top_K’的问题。而此时正确的方式则是应该使用:
区别在于变量名的大小写问题上。
例如,在caffe.proto中的AccuracyParameter定义:
optional uint32 top_K = 1 [default = 1]; //K大写
且在C++代码中使用的是:
this->layer_param_.accuracy_param().top_K(); //K大写
则会出现’AccuracyParameter’ has no member named ‘top_K’的问题。而此时正确的方式则是应该使用:
this->layer_param_.accuracy_param().top_k(); //k小写
区别在于变量名的大小写问题上。
相关文章推荐
- Android之jni出现JNIEnv has no member named 'GetMehtodID'解决办法
- 出现 com.caucho.hessian.io.HessianServiceException: The service has no method named: XXX 异常的原因及解决方法
- C语言,C++编译遇到问题:has no member named ''XXX‘
- Myeclipse出现the jar file xxx.jar has no source attachment. 问题
- error: 'struct proc_dir_entry' has no member named 'owner'的解决方法
- python导入caffe时出现python caffe报错:No module named google.protobuf.internal
- 移植2.6.31遇到的问题(2):'struct device' has no member named 'bus_id'
- 解决eclipse查看源代码出现The jar file rt.jar has no source attachment问题的方法
- 【OpenStack】No module named XXX问题解决
- ImportError: No module named caffe.proto解决办法
- 全网最详细的跑python2.7时出现from mysql import connector ImportError: No module named mysql的问题解决办法(图文详解)
- 错误:No module named caffe.proto或No module named caffe解决方法
- 解决VC 类向导添加变量后莫名其妙出现 Unhandled exception in xxx.exe:0xC0000005:Access Violation错误的问题
- 配置SSD-caffe出现“ AttributeError: 'module' object has no attribute 'LabelMap'”解决
- android.database.sqlite.SQLiteException: table has no column XXX (code 1)问题解决方法
- Qt中出现‘class QApplication’ has no member named ‘setMainWidget’
- pyinstaller安装出现'NoneType' object has no attribute 'rfind'问题解决
- 关于python里运行出现'module' object has no attribute 'xxxx'等问题解决方法
- 解决C++编译出现的重定义问题:multiple definition of ’XXX‘错误
- php5.4.26 安装出现 error: ‘struct gdIOCtx’ has no member named ‘data’