<p>I guess, the problem can be solved by using soemthing like this:</p>

<pre><code>Serialize(Archive&amp; ar, const unsigned int /* version */)
{
    ar &amp; data::CreateNVP(parameter, "parameter");

    if (Archive::is_loading::value)
    {
        NetworkWeights(parameter, network);
    }
}
</code></pre>

<p>I can't test this right now.</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/issues/513#issuecomment-192462055">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFBMk-LpGwPS3Uy6cWhEt4WyVm2vWks5pqJqCgaJpZM4HQHGn.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/issues/513#issuecomment-192462055"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>