<p>Thanks for your suggestions, they are very useful.</p>

<blockquote>
<p>Did you say you had also tested it against the UFLDL results and seen the same output?</p>
</blockquote>

<p>Yes, I verify the results with the output of display_network.m, the values and the images output by both of the functions are same</p>

<p>There are some range checking must be done on runtime, you prefer to provide runtime check, or write down the preconditions in comments?</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/465#issuecomment-151753099">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFH9wSAqMtUnavgqok4oavgwCrSlmks5pAHLWgaJpZM4GWT_f.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/465#issuecomment-151753099"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>