示例#1
0
 public ConvolutionalLayer(ActivationType activationType, int neuronsCount, int kernelSize = 3)
 {
     ActivationFunctionType = activationType;
     _function  = activationType.Get();
     KernelSize = kernelSize;
     Neurons    = new ConvolutionalNeuron[neuronsCount];
     Outputs    = new Matrix[neuronsCount];
 }
 public FullyConnectedLayer(int neuronsCount, ActivationType activationType)
 {
     ActivationFunctionType = activationType;
     Function     = activationType.Get();
     neuronsCount = Math.Max(1, neuronsCount);
     Neurons      = new FullyConnectedNeuron[neuronsCount];
     Outputs      = new double[neuronsCount];
 }
示例#3
0
 public ConvolutionLayer(ActivationType activationType, int neuronsCount, int kernelSize = 3, bool useReferences = false)
 {
     ActivationFunctionType = activationType;
     _function     = activationType.Get();
     KernelSize    = kernelSize;
     Neurons       = new ConvolutionNeuron[neuronsCount];
     Outputs       = new Matrix[neuronsCount];
     UseReferences = useReferences;
 }