<p>Looks good to me so far, but I only took a quick look.  You might find some of the stuff in <code>src/mlpack/tests/serialization.hpp</code> to be helpful for testing.  Usually when I test serialization, I'll serialize using text, XML, and binary archives, then make sure all of the models are the same after serialization.  Sometimes it's also useful to serialize over an existing model (i.e. make models A and B, then serialize A into a file, then read B from that file), so as to make sure a model properly cleans up its own memory during serialization.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/516#issuecomment-180494795">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFPJTEEaFlCgiAX9o7CUhY_u8PqCOks5phOWugaJpZM4HTzyk.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/516#issuecomment-180494795"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>