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

import build_transformer_model时报错 #495

Open
whats0mai0name opened this issue Oct 29, 2022 · 1 comment
Open

import build_transformer_model时报错 #495

whats0mai0name opened this issue Oct 29, 2022 · 1 comment

Comments

@whats0mai0name
Copy link

大佬您好,我在尝试import build_transformer_model的时候报错了,报错提示‘ModuleNotFoundError: No module named 'keras.api'’,尝试使用pip install keras==2.9.0但是依然报错,请问这种情况应该怎么解决呢?系统的基本信息如下:

基本信息

  • 你使用的操作系统: 使用的是colab
  • 你使用的Python版本: 3.7
  • 你使用的Tensorflow版本: 2.9.0
  • 你使用的Keras版本: 2.3.1
  • 你使用的bert4keras版本: 0.11.4

核心代码

from bert4keras.models import build_transformer_model


### 输出信息
ModuleNotFoundError: No module named 'keras.api'
@bojone
Copy link
Owner

bojone commented Nov 27, 2022

keras不超过2.3.1,tf不超过2.6,最好用tf 1.15

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

2 participants