最近在学习 faster rcnn ,本来环境已经配置好,已经跑完自己的程序,运行良好,后来安装了tensorflow,然后重新使用 faster rcnn 进行训练的时候居然出错了,我很纳闷,期间没有卸载或者修改配置文件啊,怎么会这样?

问题:

pb2.text_format.Merge(f.read(), self.solver_param) AttributeError: 'module' object has no attribute 'text_format'

经过google之后发现是protobuf的本版发生了变换,之前在配置caffe的时候手动安装了protbuf,版本是2.5.0,后来安装了tensorflow 我回忆了一下,protobuf的版本貌似是发生了变换。

所以解决办法:sudo pip install protobuf==2.5.0

刚才又发现一个新的解决方法:

在文件./lib/fast_rcnn/train.py增加一行import google.protobuf.text_format 即可解决问题

AttributeError: 'module' object has no attribute 'text_format'相关推荐

  1. Python 报错解决:AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

    早上升级完pip,后报错如下: -> # pip install --upgrade pwntools /usr/local/lib/python2.7/dist-packages/pip/_v ...

  2. Tensorflow报错:AttributeError: 'module' object has no attribute 'scalar_summary'

    报错: tf.scalar_summary(l.op.name + ' (raw)', l) AttributeError: 'module' object has no attribute 'sca ...

  3. Python AttributeError: 'module' object has no attribute 'posseg'

    AttributeError: 'module' object has no attribute 'posseg' 遇到问题: 如果 a 是个目录, b 是个 b.py 文件, func 是 b.py ...

  4. pytorch版本问题:AttributeError: 'module' object has no attribute '_rebuild_tensor_v2'

    用pytorch加载训练好的模型的时候遇到了如下的问题: AttributeError: 'module' object has no attribute '_rebuild_tensor_v2' 到 ...

  5. tensorflow出现如下错误:AttributeError: ‘module’ object has no attribute ‘merge_all_summaries’

    tensorflow版本问题,导致函数的变化,summary使用如下变化机制: AttributeError: 'module' object has no attribute 'merge_all_ ...

  6. AttributeError: 'module' object has no attribute 'get_frontal_face_detector'

    AttributeError: 'module' object has no attribute 'get_frontal_face_detector' 报错原因: 命名为的文件将遮盖dlib具有所需 ...

  7. Python3.X识别混合编码,顺便解决“AttributeError: 'module' object has no attribute 'urlopen'”

    原本是想利用chardet模块识别一个混合编码网页的编码类型(以百度为例),然而运行脚本发现python3.X中出现"AttributeError: 'module' object has ...

  8. AttributeError: 'module' object has no attribute '_base'

    较为完整的错误信息是: class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):   AttributeError: ...

  9. AttributeError: ‘module‘ object has no attribute ‘CALIB_HAND_EYE_PARK‘

    ubuntu18.04 ROS:melodic python2.7的环境 File "/home/bionic/yuxiangROS_handeye/catkin_ws/src/handey ...

最新文章

  1. 跨模态学习在三维语义分割领域适应中的应用
  2. fbx 转 gltf glb 文件
  3. 《构建高可用Linux服务器 第3版》—— 1.4 Linux服务器的日志管理
  4. gacutil.exe Path
  5. 【知识星球】卷积核和感受野可动态分配的分组卷积
  6. SAP 凭证冲销可以使用BAPI_ACC_DOCUMENT_REV_POST或者BDC录制FB08来做
  7. Colored Sticks--POJ 2513
  8. 每日英语:Why is Ye Shiwen’s Swim “Disturbing”?
  9. jQuery EasyUI datagrid本地分页
  10. mysql性能调整三板斧
  11. dotnet 新项目格式与对应框架预定义的宏
  12. 算法题目——多米诺骨牌问题(POJ-2663)
  13. 计算机硬件统的构成,计算机硬件统的构成部件.ppt
  14. scannet数据集和shapenet、modelnet等数据集的名称和标签对应关系
  15. GoldenGate新增表
  16. Php生成图片的大小单位是cm,php生成图片缩略图代码类
  17. 看论文时的几个数学术语
  18. Meltdown 论文翻译
  19. BIM+GIS技术为工程数字化转型提供了新的契机
  20. Git工具调优--GitFlow

热门文章

  1. boost::intrusive::bucket_traits用法的测试程序
  2. boost::fusion::clear用法的测试程序
  3. boost::fibers::launch::dispatch的测试程序
  4. GDCM:二个DICOM文件的diff差异的测试程序
  5. Boost:boost::bimaps::unordered_set_of的测试程序
  6. C语言编写带参数的宏编在三个数找最大数
  7. VTK:可视化之ColorSeriesPatches
  8. VTK:图片之ImageGaussianSmooth
  9. Qt Creator设置Qbs
  10. Qt Creator调试器故障排除