Keras: RuntimeError: maximum recursion depth exceeded while calling a Python object

Created on 9 Sep 2015  路  6Comments  路  Source: keras-team/keras

When I try to pickle a model. I got this error. I am using python3.

Most helpful comment

Not sure about python 3's recursion limit, but the recursion limit of python 2.7 is 1000 and can be increased by

import sys
sys.setrecursionlimit(10000)

All 6 comments

Not sure about python 3's recursion limit, but the recursion limit of python 2.7 is 1000 and can be increased by

import sys
sys.setrecursionlimit(10000)

Indeed this solves the problem!

I noticed that loading picked model takes only a little bit less time than compiling from scratch. Is there any way that I can load a pre-compiled model very fast?

I would generally recommend not pickling models. The method outlined here is much safer and should not take much longer in practice.

@fchollet: Thx! By the way if one using ubuntu all that he needs is:
sudo apt-get install libhdf5-dev
sudo pip3 install h5py

Did you fine a solution? I am having the same problem install PyMEL

did anyone find a solution? I'm having it too.

Was this page helpful?
0 / 5 - 0 ratings