yajiemiao / pdnn

PDNN: A Python Toolkit for Deep Learning. http://www.cs.cmu.edu/~ymiao/pdnntk.html
Apache License 2.0
224 stars 105 forks source link

Cause Error when using rectifier as activation function. #8

Closed iwatobipen closed 6 years ago

iwatobipen commented 9 years ago

Dear Yajie. I used pdnn for deep learning. It works fine but when I used 'rectifiler' as activation function, it cause following error.   cPickle.dump(cfg, output, cPickle.HIGHEST_PROTOCOL) cPickle.PicklingError: Can't pickle <type 'function'>: attribute lookup builtin.function failed

I guess, this error be caused by rectifier function is defined as lambda function. Please give me some advice if you do not mind. Regards.

ghost commented 9 years ago

Hello, I just made the following changes which should solve the problem https://github.com/yajiemiao/pdnn/commit/6e6e840bf3f0411d134ead161485157ec8bdff82