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

加载pytorch 版本的FinBERT 报错,tensorflow版本为1.14.0 #12

Open
dtMndas opened this issue Feb 26, 2022 · 0 comments
Open

加载pytorch 版本的FinBERT 报错,tensorflow版本为1.14.0 #12

dtMndas opened this issue Feb 26, 2022 · 0 comments

Comments

@dtMndas
Copy link

dtMndas commented Feb 26, 2022

代码:
model = BertForSequenceClassification.from_pretrained('/home/linux/FinBERT/bert_config.json',from_tf=True)
加载报错 ,安装tensorflow==1.14.0 会报错data_adapter 和 .keras_tensor 模块找不到

~/anaconda3/lib/python3.6/site-packages/transformers/modeling_tf_utils.py in <module>() 29 from tensorflow.python.keras import backend as K 30 from tensorflow.python.keras.engine import data_adapter ---> 31 from tensorflow.python.keras.engine.keras_tensor import KerasTensor 32 from tensorflow.python.keras.saving import hdf5_format 33 ModuleNotFoundError: No module named 'tensorflow.python.keras.engine.keras_tensor'

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

1 participant