title: What is this function doing (softmax)
body: <p>What is this "ih" and "ho" in this function . It is softmax activation function I am not able to understand the string check reason.</p>
  
  <pre><code>public double sim(double x, string layer)
      {
        // Determine max
        double max = double.MinValue;
        if (layer == "ih")
          max = (ihSum0 &gt; ihSum1) ? ihSum0 : ihSum1;
        else if (layer == "ho")
          max = (hoSum0 &gt; hoSum1) ? hoSum0 : hoSum1;
  
        // Compute scale
        double scale = 0.0;
        if (layer == "ih")
          scale = Math.Exp(ihSum0 - max) + Math.Exp(ihSum1 - max);
        else if (layer == "ho")
          scale = Math.Exp(hoSum0 - max ) + Math.Exp(hoSum1 - max);
  
        return Math.Exp(x - max) / scale;
      }
  </code></pre>