HuwCampbell/grenade

Is it possible to create neural networks in run-time?

vincent-hui opened this issue · 2 comments

For example, I want to compare the performances of neural networks with different number of hidden layers. Instead of defining neural networks in compile-time, can I create neural networks in run-time by just inputting a list of number of hidden layers from a JSON file to a network generator function ?

Yes, but it's pretty painful as it's pushing pretty hard against the boundaries of dependent types in Haskell.

One of the tests I have in the test suite is generating random networks (of random shapes), and running reverse automatic differentiation through them as well as numerical differentiation to make sure that they give the same answer. It's essentially the same idea as what you're looking for.

https://github.com/HuwCampbell/grenade/blob/master/test/Test/Grenade/Network.hs

Thank you for your quick reply. Do you have a plan to implement neural architecture search algorithms?