<p>Sorry for my misunderstanding, I should open an issue before I treat it as a bug next time.</p>

<blockquote>
<p>So instead of using the constructor list or the else case of the forward pass, we could set the ratio at the beginning of the forward pass</p>
</blockquote>

<p>Do you mean you want to set the ration when you call the Forward function?</p>

<pre><code>template&lt;typename eT&gt;
void Forward(const arma::Mat&lt;eT&gt;&amp; input, arma::Mat&lt;eT&gt;&amp; output)
{
  ratio = 0.5;
  //......
}
</code></pre>

<p>But how could the user setup the ration under this case?</p>

<blockquote>
<p>One problem I see with the solution is that a change of the probability of setting a value to zero (ratio) has no effect</p>
</blockquote>

<p>What about do the value checking when construct the dropout layer(at runtime)?<br>
Or write down the preconditions on the comments if you do not want to do any runtime check(ask the users do not set ratio as 1.0 or 0.0)<br>
Maybe there are better solutions there, but these are what I could come up with 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/pull/463#issuecomment-150010306">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFBFAwgyVGw2RyLRc0QlGVh0NrjiVks5o9-fkgaJpZM4GSg7s.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/463#issuecomment-150010306"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>