Exemplo n.º 1
0
 public static ushort EnCodeIConduction(IConduction conduction)
 {
     return(conduction switch
     {
         Sigmoind _ => 1,
         ReLU _ => 2,
         SoftReLU _ => 3,
         Straight _ => 4,
         SoftMax _ => 5,
         _ => throw new ArgumentException(
             nameof(conduction), $"this type of IConduction is not registered. {conduction}"),
     });
Exemplo n.º 2
0
        protected override NeuralNetworkImage[] BrainInitializer()
        {
            var relu = new SoftReLU();
            var init = new NeuralNetworkInitializer()
                       .SetInputSize(20);

            for (int i = 1; i < LAYER_COUBNT - 1; i++)
            {
                init.AddLayer(relu, LAYER_COUBNT + 40 - (i + 1));
            }

            init.AddLayer(new Sigmoind(), 40)
            .SetCorrection(new Errorest())
            .SetDataConvertor(new DataRange(128, -128), new DataRange(255, 0));

            return(new NeuralNetworkImage[] { (NeuralNetworkImage)init.Image() });
        }