tensorflow-问题记录

1, when use tensorflow r0.12, come accross the problem:

serialized_pb=_b(‘\n/tensorflow/core/framework/resource handle.proto\x12\tensorflow\”m\n\x0eResourceHandle\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(\tB4\n\x18org.tensorflow.frameworkB\x13ResourceHandleProtoP\x01\xf8\x01\x01\x62\x06proto3’) TypeError: init() got an unexpected keyword argument ‘syntax’

solution:
locate protobuf

import google.protobuf
print google.protobuf.__file__
print google.protobuf.__version__
3.2.0

protoc –version
2.6.1

decide to compile protobuf from source code

git clone https://github.com/google/protobuf.git
### readme is very important
sudo apt-get install autoconf automake libtool curl make g++ unzip
./autogen.sh 
./configure 
make
cd python/
sudo python setup.py install

then tensorflow works normally

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值