Cannot import name _BACKEND ERROR

I’m getting the below error when I try to run the following:

RASA core versions:

rasa_core==0.10.4 rasa_core_sdk==0.11.3

my code:

agent = Agent(domain_file, policies=[
        MemoizationPolicy(max_history=3),
        KerasPolicy(),
        FallbackPolicy(fallback_action_name="action_default_fall", nlu_threshold=0.65, core_threshold=0.4)])


agent.train(
        training_data_file,
        epochs = 200,
        batch_size = 50,
        validation_split = 0.2)

Hi @duckingbread, the Rasa Core and Rasa NLU frameworks have been merged into a single framework called Rasa. Could you install the latest version of that and the SDK and try again?

I need to run the older versions only. Anyway found out the issue. Keras released the latest version which doesn’t use the _BACKEND variable. So i just listed earlier Keras version in the requirements file.

1 Like

I have the same problem. how did you resolve it?

you can use keras 2.0.8 version it worked for me. !pip install Keras==2.0.8