[mlpack-git] [mlpack] ANN Saving the network and reloading (#531)

sudarshan notifications at github.com
Tue Mar 1 11:30:46 EST 2016


Thank you both for your replies. 

> "if using an mlpack command-line program, the type should be handled for the user; if using the mlpack C++ code, then the user is responsible for serializing and deserializing the correct type"

Moving forward, I see myself using the mlpack C++ code a lot more than the command line version, so I guess I need to care of serializing and deserializing this. The main problem in the current code is for every prediction I need to call "BuildFNN" which ends up training the network again and again. That is why I thought I could just return the trained network from where its being called and do prediction later but the I think the data gets corrupted on return and the prediction call segfaults. 

> You need to remember what kind of network you build, Following part are the "type" of network of yours

As you can see in that code decltype(modules) and decltype(classOutputLayer) determines the type of the network at compile time. I understand I pass the types on my call and I can get the classOuputLayer type pretty easily which is the BinaryClassification layer. However, the first type which is the layertypes is a std::tie (which I'm fairly new to) which returns a tuple of the input-hidden layers. I'm not sure what this returns to create a network of the appropriate type. If I can get some help on that, it'll be great!

Thanks.

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/531#issuecomment-190796758
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160301/29856db5/attachment.html>


More information about the mlpack-git mailing list