ccks2019-ckbqa-4th-codes
ccks2019-ckbqa-4th-codes copied to clipboard
您好,想问下similarity.py的tf版本和protobuf的版本应该是多少?很多属性值都失效了。
参考连接和这个库也没有看到requirement的说明
AttributeError: 'google.protobuf.pyext._message.FieldProperty' object has no attribute 'allow_growth'
AttributeError: 'google.protobuf.pyext._message.FieldProperty' object has no attribute 'per_process_gpu_memory_fraction'
我的protobuf没有版本错误,我的版本是3.14.0 tf版本好像用1.1.1可以不报错,但是我用的2.3,只需要把报错的属性值改为2.x版本的写法就可以了。
我的protobuf没有版本错误,我的版本是3.14.0 tf版本好像用1.1.1可以不报错,但是我用的2.3,只需要把报错的属性值改为2.x版本的写法就可以了。
我后来参考bert做相似度那个链接,看到里面有issues说安装tf 版本为1.12.0,后来这么说也没报错了。
similarity.py是fork这个项目里的 https://github.com/terrifyzhao/bert-utils 印象里是比较低版本的tf.1.x了
tensorflow-gpu==1.15.0 thulac==0.2.1 neo4j==4.2.1 h5py==2.10.0 numpy==1.19.5 keras_bert==0.50.0 joblib==1.0.1 six==1.15.0 Keras==2.2.4 jieba==0.42.1 gensim==3.8.3 termcolor==1.1.0 pandas==1.1.5 scikit_learn==0.24.1 tqdm==4.59.0
我的protobuf没有版本错误,我的版本是3.14.0 tf版本好像用1.1.1可以不报错,但是我用的2.3,只需要把报错的属性值改为2.x版本的写法就可以了。
你好,我想问tf.contrib.map_and_batch这个方法怎么改成2.x版本的,在similarity.py中579行 d = d.apply( tf.contrib.map_and_batch( lambda record: _decode_record(record, name_to_features), batch_size=batch_size, drop_remainder=drop_remainder))