What is this "ih" and "ho" in this function . It is softmax activation function I am not able to understand the string check reason.
public double sim(double x, string layer)
{
// Determine max
double max = double.MinValue;
if (layer == "ih")
max = (ihSum0 > ihSum1) ? ihSum0 : ihSum1;
else if (layer == "ho")
max = (hoSum0 > 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;
}