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

cannot import name 'CachedMultiHeadAttention' from partially initialized module 'keras_nlp.src.layers.modeling.cached_multi_head_attention' (most likely due to a circular import) #1427

Open
anilmamidwar15021991 opened this issue Feb 7, 2024 · 0 comments
Labels
type:Bug Something isn't working

Comments

@anilmamidwar15021991
Copy link

I am getting below error when i run my python script dealing with importing keras_nlp.

cannot import name 'CachedMultiHeadAttention' from partially initialized module 'keras_nlp.src.layers.modeling.cached_multi_head_attention' (most likely due to a circular import)

Below is the code snippet
import os
os.environ["KERAS_BACKEND"]="torch"
import keras_core as core
import keras_nlp
import keras_core.backend as k
import tensorflow as tf

i am using keras_nlp version 0.7.0 , tensorflow version 2.13.1 , keras core version 0.1.7 and keras version 2.13.1

please assist , invested quite good amount of time on all possible interest approaches but still not working.

@sachinprasadhs sachinprasadhs added the type:Bug Something isn't working label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants