Exemple #1
0
 //Constructors
 /// <summary>
 /// Creates an initialized instance.
 /// </summary>
 /// <param name="numOfNeurons">The number of neurons.</param>
 /// <param name="activationCfg">The configuration of the activation function.</param>
 public HiddenLayerSettings(int numOfNeurons, IActivationSettings activationCfg)
 {
     NumOfNeurons  = numOfNeurons;
     ActivationCfg = (IActivationSettings)activationCfg.DeepClone();
     Check();
     return;
 }
Exemple #2
0
 //Constructors
 /// <summary>
 /// Creates an initialized instance.
 /// </summary>
 /// <param name="outputActivationCfg">Configuration of the output layer activation function.</param>
 /// <param name="hiddenLayersCfg">The configuration of the hidden layers. Hidden layers are optional.</param>
 /// <param name="trainerCfg">The configuration of the associated trainer.</param>
 public FeedForwardNetworkSettings(IActivationSettings outputActivationCfg,
                                   HiddenLayersSettings hiddenLayersCfg,
                                   RCNetBaseSettings trainerCfg
                                   )
 {
     OutputActivationCfg = (IActivationSettings)outputActivationCfg.DeepClone();
     HiddenLayersCfg     = hiddenLayersCfg == null ? new HiddenLayersSettings() : (HiddenLayersSettings)hiddenLayersCfg.DeepClone();
     TrainerCfg          = trainerCfg.DeepClone();
     Check();
     return;
 }
 //Constructors
 /// <summary>
 /// Creates an initialized instance.
 /// </summary>
 /// <param name="name">The name of the neuron group.</param>
 /// <param name="relShare">Specifies how big relative portion of pool's neurons is formed by this group of the neurons.</param>
 /// <param name="activationCfg">The common configuration of the neurons' activation function.</param>
 /// <param name="predictorsCfg">The common configuration of the predictors provider.</param>
 /// <param name="homogenousExcitabilityCfg">The configuration of the neurons homogenous excitability.</param>
 /// <param name="biasCfg">The configuration of the constant input bias.</param>
 public SpikingNeuronGroupSettings(string name,
                                   double relShare,
                                   IActivationSettings activationCfg,
                                   PredictorsProviderSettings predictorsCfg,
                                   HomogenousExcitabilitySettings homogenousExcitabilityCfg = null,
                                   RandomValueSettings biasCfg = null
                                   )
 {
     Name                      = name;
     RelShare                  = relShare;
     ActivationCfg             = (IActivationSettings)activationCfg.DeepClone();
     PredictorsCfg             = (PredictorsProviderSettings)predictorsCfg.DeepClone();
     HomogenousExcitabilityCfg = homogenousExcitabilityCfg == null ? new HomogenousExcitabilitySettings() : (HomogenousExcitabilitySettings)homogenousExcitabilityCfg.DeepClone();
     BiasCfg                   = biasCfg == null ? null : (RandomValueSettings)biasCfg.DeepClone();
     Check();
     return;
 }
 //Constructors
 /// <summary>
 /// Creates an initialized instance.
 /// </summary>
 /// <param name="name">The name of the neuron group.</param>
 /// <param name="relShare">Specifies how big relative portion of pool's neurons is formed by this group of the neurons.</param>
 /// <param name="activationCfg">The common configuration of the neurons' activation function.</param>
 /// <param name="predictorsCfg">The common configuration of the predictors provider.</param>
 /// <param name="firingThreshold">The firing threshold value. Every time the current normalized activation is higher than the normalized past reference activation by at least this threshold, it is evaluated as a firing event.</param>
 /// <param name="thresholdMaxRefDeepness">Maximum age of the past activation for the evaluation of the firing event.</param>
 /// <param name="biasCfg">The configuration of the constant input bias.</param>
 /// <param name="retainmentCfg">The configuration of the neurons' retainment property.</param>
 public AnalogNeuronGroupSettings(string name,
                                  double relShare,
                                  IActivationSettings activationCfg,
                                  PredictorsProviderSettings predictorsCfg,
                                  double firingThreshold           = DefaultFiringThreshold,
                                  int thresholdMaxRefDeepness      = DefaultThresholdMaxRefDeepness,
                                  RandomValueSettings biasCfg      = null,
                                  RetainmentSettings retainmentCfg = null
                                  )
 {
     Name                    = name;
     RelShare                = relShare;
     ActivationCfg           = (IActivationSettings)activationCfg.DeepClone();
     PredictorsCfg           = (PredictorsProviderSettings)predictorsCfg.DeepClone();
     FiringThreshold         = firingThreshold;
     ThresholdMaxRefDeepness = thresholdMaxRefDeepness;
     BiasCfg                 = biasCfg == null ? null : (RandomValueSettings)biasCfg.DeepClone();
     RetainmentCfg           = retainmentCfg == null ? null : (RetainmentSettings)retainmentCfg.DeepClone();
     Check();
     return;
 }