jonathan-laurent / AlphaZero.jl

A generic, simple and fast implementation of Deepmind's AlphaZero algorithm.
https://jonathan-laurent.github.io/AlphaZero.jl/stable/
MIT License
1.22k stars 136 forks source link

Trained networks? #215

Closed tasuki closed 1 day ago

tasuki commented 1 week ago

As training networks from scratch is "incredibly wasteful", do people perhaps share their AlphaZero.jl trained networks anywhere? I've read the docs and haven't seen that mentioned!

Also I have a million other questions, but not sure where to ask, GitHub issues don't feel like the right place... is there an AlphaZero.jl chat somewhere on one of the Zulip/Slack/Discord or other?

jonathan-laurent commented 1 week ago

Adding facilities for sharing weights would be a nice contribution. Something like ONNX.jl may be useful here.

Regarding questions, there is an AlphaZero.jl channel on the Julia slack. But you should feel free to open issues too.

tasuki commented 2 days ago

Jonathan, thank you for your answer. I've never used Julia and am not even sure what the ML libraries are nor what the native format of the weights is. I thought sharing weights would be just a matter of sharing the native weights file on like a Google Drive or Dropbox or wherever? ONNX would be nice to have interop, but that's not even what I was looking for.

Wrt my contributing, AlphaZero.jl is an extremely cool project, and I'd love to contribute one day! My current life circumstances are not conductive to much contribution though...

jonathan-laurent commented 2 days ago

Exporting and loading weights is a more subtle task than it may appear. A naive solution would just move the full network to CPU and use the Julia serializer (akin to Python's pickle). However, the resulting weight file would be very fragile and potentially break at every patch release of the neural network library you're using. This is why using standards such as ONNX is needed for a really satisfying solution to be found.

tasuki commented 1 day ago

Jonathan, thank you for the clarification!