Esempio n. 1
0
    public NetOutput GetMaxOutputId()
    {
        NetOutput output = new NetOutput(-1, false);
        float     max    = float.MinValue;

        for (int i = 1; i < outputLayer.numNodes; i++)
        {
            if (outputLayer.neuronValues[i] > max)
            {
                max       = outputLayer.neuronValues[i];
                output.id = i;
            }
        }
        if (outputLayer.neuronValues[0] > 0.5)
        {
            output.action = true;
        }
        else
        {
            output.action = false;
        }
        return(output);
    }