neon icon indicating copy to clipboard operation
neon copied to clipboard

Serializing model gives MemoryError

Open SimonTeixidor opened this issue 8 years ago • 0 comments

I try to serialize my model using model.save_params("/home/simon/trained_model.prm"). The file gets created, but no bytes get written to it, and I get this output in the terminal:

Traceback (most recent call last):
  File "classifier.py", line 82, in <module>
    model.save_params("/home/simon/trained_model.prm")
  File "/usr/lib/python3.4/site-packages/neon/models/model.py", line 327, in save_params
    self.serialize(keep_states=keep_states, fn=param_path)
  File "/usr/lib/python3.4/site-packages/neon/models/model.py", line 436, in serialize
    save_obj(pdict, fn)
  File "/usr/lib/python3.4/site-packages/neon/util/persist.py", line 87, in save_obj
    pickle.dump(obj, open(save_path, 'wb'), 2)
MemoryError

Please tell me if there is some more information I can provide to help solve this.

SimonTeixidor avatar Sep 16 '16 07:09 SimonTeixidor