<blockquote>
<p>If we could store the PerformanceFunction, this problem could be solved.Rather than calling static Error function, call it like``</p>
</blockquote>

<p>You are right. The suggested change looks great to me.</p>

<blockquote>
<p>The other question is, do you have any plans to provide move constructor and move assignments for ann modules? ``</p>
</blockquote>

<p>I haven't had the time yet to provide a move constructor, but it's on my list. If you like, to provide some code, I'll be happy to merge the changes. But don't feel obligated.</p>

<blockquote>
<p>The performance function should be able to accept the reference of RhoCap of hiddenLayer, because both of the hiddenLayer and the performance function need to use it.</p>
</blockquote>

<p>If we pass the Weights and the RhoCap parameter we have to handle the pass of the parameter inside of the fnn class, if we pass an instance of the network, we can handle the parameter inside the performance function.</p>

<p>If we implement a getter function for the <code>RhoCap</code> parameter inside the new <code>SparseLinearLayer</code>, we don't need to provide a special constructor. We can update the parameter inside the error function once we call the performance function. What do you think about the idea?</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/451#issuecomment-162353769">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFKSMk6lXh81M5VIV_sT8I5K_dapDks5pNKttgaJpZM4GAqt4.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/451#issuecomment-162353769"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>