-
Notifications
You must be signed in to change notification settings - Fork 355
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
Can not pickle the optimizer #1459
Comments
I'm not sure if this fixes it, but |
Can you replace the callback with a proper function? So
Becomes
|
This didn't fix it but i have no idea if it would create any problems in the future so i changed it to the suggested.
This did the Job, now its working fine. i knew that python couldn't pickle lambda functions as there can be many, but i never noticed that lambda was used in the EarlyStopping callback. i thought it was used internally in one of the underlying functions... thank you very much. I would like to close the issue now, but i wanted to point out a few things that can help alleviate similar future issues and leave it up to you to close it at your own convenience:
|
Steps to reproduce
Observed Results
PicklingError: Can't pickle <function <lambda> at 0x2aab03ecf820>: attribute lookup <lambda> on __main__ failed
Expected Results
Relevant Code
The text was updated successfully, but these errors were encountered: