How do you save a Neural Network to file using Ruby's ai4r gem?
Posted
by Jaime Bellmyer
on Stack Overflow
See other posts from Stack Overflow
or by Jaime Bellmyer
Published on 2010-04-08T20:40:55Z
Indexed on
2010/04/08
20:43 UTC
Read the original article
Hit count: 228
ruby
|artificial-neural-network
I'm using ruby's ai4r gem, building a neural network. Version 1.1 of the gem allowed me to simply do a Marshal.dump(network) to a file, and I could load the network back up whenever I wanted.
With version 1.9 a couple years later, I'm no longer able to do this. It generates this error when I try:
no marshal_dump is defined for class Proc
I know the reason for the error - Marshal can't handle procs in an object. Fair enough.
So is there something built in to ai4r? I've been searching with no luck. I can't imagine any practical use for a neural network you have to rebuild from scratch every time you want to use it.
© Stack Overflow or respective owner