<p>In <a href="https://github.com/mlpack/mlpack/pull/451#discussion_r40669794">src/mlpack/methods/ann/activation_functions/lazy_logistic_function.hpp</a>:</p>
<pre style='color:#555'>&gt; + * f^{-1}(y) &amp;=&amp; ln(\frac{y}{1-y})
&gt; + * @f}
&gt; + */
&gt; +class LazyLogisticFunction
&gt; +{
&gt; +  public:
&gt; +  /**
&gt; +   * Computes the logistic function without checking overflow or underflow
&gt; +   *
&gt; +   * @param x Input data.
&gt; +   * @param y The resulting output activation.
&gt; +   */
&gt; +  template&lt;typename InputVecType, typename OutputVecType&gt;
&gt; +  static void fn(const InputVecType&amp; x, OutputVecType&amp; y)
&gt; +  {
&gt; +    y = (1.0 / (1 + arma::exp(-x)));
</pre>
<p>Originally my intention for the overflow checks in the LogisticFunction class was to avoid strange issues during the training process. But I'm intended to remove the checks in the LogisticFunction class, if you agree we can remove the LazyLogisticFunction class and just use the LogisticFunction class.</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/files#r40669794">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFEDoeJhviRr2v3s1367BUpZLA5lXks5o2ohIgaJpZM4GAqt4.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/files#r40669794"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>