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

Chapter 9 - Trading strategy - kernel Died #15

Open
alecontuIT opened this issue Mar 26, 2024 · 1 comment
Open

Chapter 9 - Trading strategy - kernel Died #15

alecontuIT opened this issue Mar 26, 2024 · 1 comment

Comments

@alecontuIT
Copy link

During the training of the model i can't even finish the first episode because after some time I get the message "Kernel died". I'm using a macbook with m1. I tried to lower the training size, the memory size, but the result is always the same.

@vkresch
Copy link

vkresch commented Sep 7, 2024

You need to clear the session when training multiple models in a loop because Keras is managing a global state which consume more memory the more loops the model training takes. Import with keras import backend as K and put K.clear_session() at the end of the for loop.

Source: https://keras.io/api/utils/config_utils/

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