用了好久的时间搞定了机器学习,今天想搞一搞深度学习,用TensorFlow的过程中却遇到了错误:

Traceback (most recent call last):File "F:/编程/python/python人工智能/python就业/深度学习/TensorFlow基础/Tensorflow初体验.py", line 1, in <module>import tensorflow as tfFile "D:\Python\lib\site-packages\tensorflow\__init__.py", line 24, in <module>from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-importFile "D:\Python\lib\site-packages\tensorflow\python\__init__.py", line 52, in <module>from tensorflow.core.framework.graph_pb2 import *File "D:\Python\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 15, in <module>from tensorflow.core.framework import node_def_pb2 as tensorflow_dot_core_dot_framework_dot_node__def__pb2File "D:\Python\lib\site-packages\tensorflow\core\framework\node_def_pb2.py", line 15, in <module>from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2File "D:\Python\lib\site-packages\tensorflow\core\framework\attr_value_pb2.py", line 15, in <module>from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2File "D:\Python\lib\site-packages\tensorflow\core\framework\tensor_pb2.py", line 15, in <module>from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2File "D:\Python\lib\site-packages\tensorflow\core\framework\resource_handle_pb2.py", line 22, in <module>serialized_pb=_b('\n/tensorflow/core/framework/resource_handle.proto\x12\ntensorflow\"r\n\x13ResourceHandleProto\x12\x0e\n\x06\x64\x65vice\x18\x01 \x01(\t\x12\x11\n\tcontainer\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x11\n\thash_code\x18\x04 \x01(\x04\x12\x17\n\x0fmaybe_type_name\x18\x05 \x01(\tBn\n\x18org.tensorflow.frameworkB\x0eResourceHandleP\x01Z=github.com/tensorflow/tensorflow/tensorflow/go/core/framework\xf8\x01\x01\x62\x06proto3')
TypeError: __init__() got an unexpected keyword argument 'serialized_options'

历时两个小时,终于解决了。

问题其实很简单,TensorFlow和protobuf的版本不匹配,

我的TensorFlow和protobuf版本:

tensorflow                         1.13.0rc1protobuf                           3.1.0

tensorflow 1.13.0rc1需要的是protobuf 3.6.1,所以不匹配,

具体的解决步骤:

pip3 uninstall protobuf pip3 uninstall tensorflowpip3 install tensorflow

新的问题

paddlepaddle,百度自主研发,真正源于产业实践,易学易用,安全高效分布式深度学习框架。
paddlepaddle 1.2.1 has requirement protobuf==3.1
很头疼,两个深度学习框架需要的protobuf版本不一样。

所以,自己决定吧。

(支持国产)

TensorFlow错误:TypeError: __init__() got an unexpected keyword argument 'serialized_options'相关推荐

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

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

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

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

  3. python中错误TypeError: __init__() got an unexpected keyword argument 'shape'

    学习TensorFlow遇到的问题: 1 如何在不同计算图上定义和使用变量 书上代码: import tensorflow as tfg1 = tf.Graph() with g1.as_defaul ...

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

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

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

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

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

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

  7. Jupyter notebook: TypeError: __init__() got an unexpected keyword argument 'io_loop 问题

    使用环境:Anaconda3(Python3.6) 创建一个新的notebook时,无法连接到kernel,terminal上显示错误为:TypeError: __init__() got an un ...

  8. json.loads时TypeError: __init__() got an unexpected keyword argument ‘encoding‘ 的解决方案

      大家好,我是爱编程的喵喵.双985硕士毕业,现担任全栈工程师一职,热衷于将数据思维应用到工作与生活中.从事机器学习以及相关的前后端开发工作.曾在阿里云.科大讯飞.CCF等比赛获得多次Top名次.现 ...

  9. 【Python异常】TypeError: __init__() got an unexpected keyword argument ‘size‘与gensim.models.word2vec 参数

    文章目录 一.遇到的异常: 1.TypeError: __init__() got an unexpected keyword argument 'size' 2.TypeError: __init_ ...

最新文章

  1. java中Array和ArrayList区别
  2. 技术分享:几种常见的JavaScript混淆和反混淆工具分析实战【转】
  3. 【人脸表情识别】不得不读的重要论文推荐(2019-2020篇)
  4. 数字语音信号处理学习笔记——语音信号的同态处理(3)
  5. Hexo创建导航页面
  6. http get 消息的作用是什么?_http基础知识
  7. 前端性能优化之性能测试
  8. python编码问题无法复现_python中烦人的编码问题
  9. 使用PXE+dhcpd+vsftpd+tftp+kickstart 实现无人值守安装linux
  10. 阶段3 2.Spring_09.JdbcTemplate的基本使用_2 JdbcTemplate的概述和入门
  11. HTML5:Animate cc交互之“影片剪辑”实现“按钮”功能
  12. ACM Hrbeu OJ 1201 Simplest Task in Windows || ZOJ 2480
  13. String转成JSON或String转为list后转为JSON或String转为map后转为JSON
  14. CSS-----颜色值的缩写和字体的缩写方法
  15. mysql笔记--03DML
  16. 明明都保意外,定期寿险和意外险到底区别在哪里?
  17. 数据仓库工程师的职业规划
  18. Inventor制作动画
  19. 【★】IT界8大恐怖预言
  20. 蓝桥杯——java(b组)省赛

热门文章

  1. 关于动画培养灵感的网站
  2. iphone/ipad图标尺寸
  3. java 中的访问修饰符
  4. 【转】 Android 屏幕切换总结
  5. NiosII中Flash的使用(转)
  6. mysql freebuf_浅析mysql存储过程
  7. 实验5 函数程序设计 6-8 使用函数求最大公约数
  8. matlab while 跳出,请帮忙看下这个程序为什么跳不出WHILE循环??
  9. ateq测漏仪f620中文说明书_Yaman雅萌美容仪详细介绍及2019年韩国免税店最新报价...
  10. 课程设计---图书登记管理系统