<p>I thought about it for a bit... I think this functionality may already exist (mostly).  The <code>data::Save()</code> function will save to PGM or PPM using Armadillo's support.  So, if you added a <code>Parameters()</code> accessor to <code>SparseAutoencoder</code>, maybe this would work:</p>

<pre><code>SparseAutoencoder sa(...);
data::Save("encoder_result.pgm", sa.Parameters());
</code></pre>

<p>Does that do basically the same thing?</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/452#issuecomment-149760987">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFBXav9t1qGHHIhndnxP8MgBoyUwLks5o9u5-gaJpZM4GA0ZB.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/452#issuecomment-149760987"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>