public ConvolutionalLayer(int filterNumber, int filterSize, string activationFunction, string padding) : base("Convolutional")
        {
            FilterNumber = filterNumber;
            FilterSize   = filterSize;

            if (activationFunction == "relu")
            {
                ActivationFunction = new ReluActivation();
            }
            else if (activationFunction == "softmax")
            {
                ActivationFunction = new SoftmaxActivation();
            }
            else if (activationFunction == "sigmoid")
            {
                ActivationFunction = new SigmoidActivation();
            }
            else if (activationFunction == "no")
            {
                ActivationFunction = new NoActivation();
            }

            Filters = new Filter[filterNumber];

            Padding = padding;
        }
Example #2
0
 public DenseLayer(int numberOfUnits, string activationFunction) : base("Dense")
 {
     NumberOfUnits = numberOfUnits;
     if (activationFunction == "relu")
     {
         ActivationFunction = new ReluActivation();
     }
     else if (activationFunction == "softmax")
     {
         ActivationFunction = new SoftmaxActivation();
     }
     else if (activationFunction == "sigmoid")
     {
         ActivationFunction = new SigmoidActivation();
     }
     else if (activationFunction == "no")
     {
         ActivationFunction = new NoActivation();
     }
 }