执行pointpillars的模型转时报了一个关于protobuf的错误:

nvidia@nvidia-desktop:~/hive_pointpillars/second/pytorch$ python3 hive_convert.py 
/home/nvidia/.local/lib/python3.6/site-packages/skcuda/cublas.py:284: UserWarning: creating CUBLAS context to get version number
  warnings.warn('creating CUBLAS context to get version number')
Traceback (most recent call last):
  File "hive_convert.py", line 8, in <module>
    from hive_context import PointPillarsContext
  File "/home/nvidia/hive_pointpillars/second/pytorch/hive_context.py", line 8, in <module>
    from second.builder import target_assigner_builder,voxel_builder
  File "/home/nvidia/hive_pointpillars/second/builder/target_assigner_builder.py", line 4, in <module>
    from second.protos import target_pb2, anchors_pb2
  File "/home/nvidia/hive_pointpillars/second/protos/target_pb2.py", line 15, in <module>
    from second.protos import anchors_pb2 as second_dot_protos_dot_anchors__pb2
  File "/home/nvidia/hive_pointpillars/second/protos/anchors_pb2.py", line 22, in <module>
    serialized_pb=_b('\n\x1bsecond/protos/anchors.proto\x12\rsecond.protos\"\xa2\x01\n\x12\x41nchorGeneratorOld\x12\x12\n\nclass_name\x18\x01 \x01(\t\x12\x11\n\tbev_range\x18\x02 \x03(\x02\x12\x17\n\x0f\x61nchor_center_z\x18\x03 \x01(\x02\x12\x14\n\x0c\x61nchor_sizes\x18\x04 \x03(\x02\x12\x19\n\x11matched_threshold\x18\x05 \x01(\x02\x12\x1b\n\x13unmatched_threshold\x18\x06 \x01(\x02\"\xa7\x01\n\x15\x41nchorGeneratorStride\x12\x12\n\nclass_name\x18\x01 \x01(\t\x12\r\n\x05sizes\x18\x02 \x03(\x02\x12\x0f\n\x07strides\x18\x03 \x03(\x02\x12\x0f\n\x07offsets\x18\x04 \x03(\x02\x12\x11\n\trotations\x18\x05 \x03(\x02\x12\x19\n\x11matched_threshold\x18\x06 \x01(\x02\x12\x1b\n\x13unmatched_threshold\x18\x07 \x01(\x02\"\x9b\x01\n\x14\x41nchorGeneratorRange\x12\x12\n\nclass_name\x18\x01 \x01(\t\x12\r\n\x05sizes\x18\x02 \x03(\x02\x12\x15\n\ranchor_ranges\x18\x03 \x03(\x02\x12\x11\n\trotations\x18\x04 \x03(\x02\x12\x19\n\x11matched_threshold\x18\x05 \x01(\x02\x12\x1b\n\x13unmatched_threshold\x18\x06 \x01(\x02\"\x82\x02\n\x19\x41nchorGeneratorCollection\x12G\n\x17\x61nchor_generator_stride\x18\x01 \x01(\x0b\x32$.second.protos.AnchorGeneratorStrideH\x00\x12\x45\n\x16\x61nchor_generator_range\x18\x02 \x01(\x0b\x32#.second.protos.AnchorGeneratorRangeH\x00\x12\x41\n\x14\x61nchor_generator_old\x18\x03 \x01(\x0b\x32!.second.protos.AnchorGeneratorOldH\x00\x42\x12\n\x10\x61nchor_generator\"\xa8\x01\n\x16\x41nchorGenerator_depara\x12\x12\n\nclass_name\x18\x01 \x01(\t\x12\r\n\x05sizes\x18\x02 \x03(\x02\x12\x0f\n\x07strides\x18\x03 \x03(\x02\x12\x0f\n\x07offsets\x18\x04 \x03(\x02\x12\x11\n\trotations\x18\x05 \x03(\x02\x12\x19\n\x11matched_threshold\x18\x06 \x01(\x02\x12\x1b\n\x13unmatched_threshold\x18\x07 \x01(\x02\"z\n\x11\x41nchorGeneratorV1\x12\x17\n\x0f\x61nchor_center_z\x18\x01 \x01(\x02\x12\x14\n\x0c\x61nchor_sizes\x18\x02 \x03(\x02\x12\x19\n\x11matched_threshold\x18\x03 \x01(\x02\x12\x1b\n\x13unmatched_threshold\x18\x04 \x01(\x02\x62\x06proto3')
TypeError: __new__() got an unexpected keyword argument 'serialized_options'

怀疑是protobuf版本过低的问题,检查一下版本。

nvidia@nvidia-desktop:~/hive_pointpillars/second/pytorch$ pip3 list|grep -i protobuf
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
protobuf (3.0.0)

当前版本为3.0.0,尝试升级到最新版本。
nvidia@nvidia-desktop:~/hive_pointpillars/second/pytorch$ pip3 install -U protobuf
Collecting protobuf
  Downloading https://files.pythonhosted.org/packages/d5/e0/20ba06eb42155cdb4c741e5caf9946e4569e26d71165abaecada18c58603/protobuf-3.17.3-py2.py3-none-any.whl (173kB)
    100% |████████████████████████████████| 174kB 833kB/s 
Collecting six>=1.9 (from protobuf)
  Using cached https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Installing collected packages: six, protobuf
Successfully installed protobuf-3.17.3 six-1.16.0

完美解决!!

【异常处理】TypeError: __new__() got an unexpected keyword argument ‘serialized_options‘相关推荐

  1. ObjectDetecionAPI TypeError: __new__() got an unexpected keyword argument 'serialized_options'

    转载地址:https://stackoverflow.com/questions/50338968/objectdetecionapi-typeerror-new-got-an-unexpected- ...

  2. TensorFlow升级新版本后TypeError: __new__() got an unexpected keyword argument 'serialized_options'

    环境: win7+python3.6+tensorflow 1.12 升级到1.12版本后,导入TensorFlow报错 解决办法: pip install -U protobuf

  3. 成功解决TypeError: __init__() got an unexpected keyword argument 'serialized_options'

    成功解决TypeError: __init__() got an unexpected keyword argument 'serialized_options' 目录 解决问题 解决思路 解决方法 ...

  4. TensorFlow错误:TypeError: __init__() got an unexpected keyword argument 'serialized_options'

    用了好久的时间搞定了机器学习,今天想搞一搞深度学习,用TensorFlow的过程中却遇到了错误: Traceback (most recent call last):File "F:/编程/ ...

  5. 解决typeError: init() got an unexpected keyword argument ‘serialized_options’

    解决typeError: init() got an unexpected keyword argument 'serialized_options' 问题描述:运行python文件时,手贱捣鼓了一下 ...

  6. import tensorflow 出错TypeError: init() got an unexpected keyword argument 'serialized_options'

    博主在import tensorflow 的时候,出现如下错误: >>> import tensorflow as tf Traceback (most recent call la ...

  7. TypeError: __init__() got an unexpected keyword argument #34serialized_options #34

    TypeError: __init__() got an unexpected keyword argument 'serialized_options' TypeError: __init__() ...

  8. flask_sqlalchemy连接Mysql报TypeError: create_engine() got an unexpected keyword argument 'encoding'解决办法

    最近在使用flask_sqlalchemy连接mysql,但是遇到一个很奇葩的问题,代码如下: #-*-coding:utf-8 -*-from flask_sqlalchemy import SQL ...

  9. 成功解决TypeError: read_excel() got an unexpected keyword argument ‘parse_cols or ‘sheetname‘

    成功解决TypeError: read_excel() got an unexpected keyword argument 'parse_cols' TypeError: read_excel() ...

最新文章

  1. 十分钟成为 TiDB Contributor,还送限量版马克杯
  2. 三年深入探索,网易云信让在线医疗做到技术“在线”
  3. BZOJ3511: 土地划分
  4. 【LightOJ - 1079】Just another Robbery(概率dp,概率背包)
  5. python安装轮子_如何安装这个轮子?
  6. 微服务治理框架的选择:对比Spring Cloud和Istio
  7. C++高级教程之多线程
  8. laravel的blade模板的布局嵌套
  9. Android通讯录(一)
  10. bulk insert 总结
  11. 2020.11.18 比赛总结题解合集
  12. 信息学奥赛一本通 提高篇
  13. 115、神州数码交换机配置基本命令
  14. 现代大学英语精读第二版(第四册)学习笔记(原文及全文翻译)——5B - Could You Live with Less(你可以简朴地生活吗)
  15. 项目进度管理+项目成本管理
  16. Nginx报错:nginx: [error] invalid PID number in /run/nginx.pid的解决方案
  17. OSI 的七层模型有哪些?
  18. stm32cubemx hal学习记录:SPI W25Q64
  19. Pycharm中运行yolov5-pytorch出现错误:AttributeError: ‘Hardswish‘ object has no attribute ‘inplace‘
  20. Codeforces Round 862 (Div. 2) 题解

热门文章

  1. css中position(absolute)与margin同时使用的情况
  2. Shutdown定时关机器源码
  3. 微信小程序输入框光标从中间删除跳到最后bug解决
  4. 用LSTM进行情感分析原理
  5. c语言在线考试系统的需求分析,基于C/S架构的通用计算机在线考试系统
  6. Scrapy爬取1——接口数据爬取准备
  7. markdown2 激活码
  8. Facebook Paper使用的第三方库
  9. java weka搭建_weka的安装和配置
  10. 免费PDF阅读器有哪些? 14款强烈推荐的PDF阅读器!