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

from tensorboardX import SummaryWriter

 

出错

Traceback (most recent call last):
  File "D:/pytorch/SRDenseNet-pytorch-master/train.py", line 20, in <module>
    from tensorboardX import SummaryWriter
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorboardX\__init__.py", line 5, in <module>
    from .torchvis import TorchVis
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorboardX\torchvis.py", line 11, in <module>
    from .writer import SummaryWriter
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorboardX\writer.py", line 27, in <module>
    from .event_file_writer import EventFileWriter
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorboardX\event_file_writer.py", line 28, in <module>
    from .proto import event_pb2
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorboardX\proto\event_pb2.py", line 15, in <module>
    from tensorboardX.proto import summary_pb2 as tensorboardX_dot_proto_dot_summary__pb2
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorboardX\proto\summary_pb2.py", line 15, in <module>
    from tensorboardX.proto import tensor_pb2 as tensorboardX_dot_proto_dot_tensor__pb2
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorboardX\proto\tensor_pb2.py", line 15, in <module>
    from tensorboardX.proto import resource_handle_pb2 as tensorboardX_dot_proto_dot_resource__handle__pb2
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorboardX\proto\resource_handle_pb2.py", line 22, in <module>
    serialized_pb=_b('\n(tensorboardX/proto/resource_handle.proto\x12\x0ctensorboardX\"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(\tB/\n\x18org.tensorflow.frameworkB\x0eResourceHandleP\x01\xf8\x01\x01\x62\x06proto3')
TypeError: __new__() got an unexpected keyword argument 'serialized_options'
 

 

 

解决办法:

 

pip uninstall protobuf
pip install -U protobuf
发布了24 篇原创文章 · 获赞 7 · 访问量 2万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览