简体   繁体   English

从Python运行Tensorflow Deep Dream教程时发生TypeError:TypeError:__init __()获得了意外的关键字参数'serialized_options'

[英]TypeError while Running Tensorflow Deep Dream Tutorial from Python: TypeError: __init__() got an unexpected keyword argument 'serialized_options'

I have taken the tensorflow deepdream example and have converted the Jupyter Notebook to a normal Python module . 我以tensorflow deepdream示例为例 ,并将Jupyter Notebook转换为普通的Python模块

When running the module from Eclipse / Python 3.6, I get the following traceback: 从Eclipse / Python 3.6运行模块时,我得到以下回溯:

Traceback (most recent call last):
  File "C:\git\tensorflow\tensorflow\examples\tutorials\deepdream\deepdream_python.py", line 43, in 
    import tensorflow as tf
  File "C:\Program Files\Python36\lib\site-packages\tensorflow\__init__.py", line 22, in 
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\__init__.py", line 52, in 
    from tensorflow.core.framework.graph_pb2 import *
  File "C:\Program Files\Python36\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 15, in 
    from tensorflow.core.framework import node_def_pb2 as tensorflow_dot_core_dot_framework_dot_node__def__pb2
  File "C:\Program Files\Python36\lib\site-packages\tensorflow\core\framework\node_def_pb2.py", line 15, in 
    from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
  File "C:\Program Files\Python36\lib\site-packages\tensorflow\core\framework\attr_value_pb2.py", line 15, in 
    from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2
  File "C:\Program Files\Python36\lib\site-packages\tensorflow\core\framework\tensor_pb2.py", line 15, in 
    from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2
  File "C:\Program Files\Python36\lib\site-packages\tensorflow\core\framework\resource_handle_pb2.py", line 22, in 
    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'

There is a similar stackoverflow question where the user was able to workaround the problem by updating tensorboard to 1.9.0. 有一个类似的stackoverflow问题 ,用户可以通过将tensorboard更新为1.9.0来解决该问题。 I have the tensorflow and tensorboard 1.10.0 PyPi packages installed and even tried with version 1.9.0, but this doesn't resolve the problem. 我安装了tensorflow和tensorboard 1.10.0 PyPi软件包,甚至尝试使用1.9.0版本,但这不能解决问题。

There is another question that looks related to the issue, but no one has answered it. 看起来还有一个与此问题相关的问题,但没有人回答。

安装tensorflow 1.9.0是解决此问题的方法。

pip install tensorflow==1.9.0

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Python TypeError:__init __()获得了意外的关键字参数'serialized_options' - Python TypeError: __init__() got an unexpected keyword argument 'serialized_options' Tensorboard TypeError:__init__() 得到了一个意外的关键字参数“serialized_options” - Tensorboard TypeError: __init__() got an unexpected keyword argument 'serialized_options' Selenium Firefox:TypeError:__init__() 得到了一个意外的关键字参数“options” - Selenium Firefox : TypeError: __init__() got an unexpected keyword argument 'options' TypeError:__init __()获得了意外的关键字参数'options' - TypeError: __init__() got an unexpected keyword argument 'options' TypeError at '' __init__() 得到一个意外的关键字参数 '' - TypeError at '' __init__() got an unexpected keyword argument '' TypeError: __init__() 在使用 EdgeOptions 时得到了一个意外的关键字参数 'options' - TypeError: __init__() got an unexpected keyword argument 'options' while using EdgeOptions Python 3.5:TypeError:__ init __()得到了一个意外的关键字参数'nosigint' - Python 3.5 : TypeError: __init__() got an unexpected keyword argument 'nosigint' python请求:TypeError:__ init __()得到一个意外的关键字参数'proxies' - python requests: TypeError: __init__() got an unexpected keyword argument 'proxies' Python openpyxl TypeError:__init __()获得了意外的关键字参数'pivotButton' - Python openpyxl TypeError: __init__() got an unexpected keyword argument 'pivotButton' Telethon Python TypeError:__init__() 得到了一个意外的关键字参数“hash” - Telethon Python TypeError: __init__() got an unexpected keyword argument 'hash'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM