Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

您好,想问下similarity.py的tf版本和protobuf的版本应该是多少?很多属性值都失效了。 #51

Open
pen-ho opened this issue Dec 14, 2020 · 5 comments

Comments

@pen-ho
Copy link

pen-ho commented Dec 14, 2020

参考连接和这个库也没有看到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'

@HankTown
Copy link

我的protobuf没有版本错误,我的版本是3.14.0
tf版本好像用1.1.1可以不报错,但是我用的2.3,只需要把报错的属性值改为2.x版本的写法就可以了。

@pen-ho
Copy link
Author

pen-ho commented Dec 15, 2020

我的protobuf没有版本错误,我的版本是3.14.0
tf版本好像用1.1.1可以不报错,但是我用的2.3,只需要把报错的属性值改为2.x版本的写法就可以了。

我后来参考bert做相似度那个链接,看到里面有issues说安装tf 版本为1.12.0,后来这么说也没报错了。

@duterscmy
Copy link
Owner

similarity.py是fork这个项目里的 https://github.com/terrifyzhao/bert-utils
印象里是比较低版本的tf.1.x了

@georgewangchn
Copy link

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

@lijing0224
Copy link

我的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))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants