コード例 #1
0
ファイル: Base.cs プロジェクト: sbatman/Cranium
 public virtual void Dispose()
 {
     _ParentLayer = null;
     _ForwardWeights.Clear();
     _ForwardWeights = null;
     _ReverseWeights.Clear();
     _ReverseWeights = null;
     _ActivationFunction.Dispose();
     _ActivationFunction = null;
 }
コード例 #2
0
ファイル: Base.cs プロジェクト: sbatman/Cranium
 /// <summary>
 ///     Initializes a new instance of the
 ///     <see>
 ///         <cref>Cranium.Structure.Node.Base</cref>
 ///     </see>
 ///     class for use by the serializer.
 /// </summary>
 /// <param name='layer'>
 ///     Layer.
 /// </param>
 /// <param name='activationFunction'>
 ///     Activation function.
 /// </param>
 public Base(Layer.Base layer, ActivationFunction.Base activationFunction)
 {
     _ParentLayer = layer;
     _ActivationFunction = activationFunction;
 }
コード例 #3
0
ファイル: Base.cs プロジェクト: sbatman/Cranium
 /// <summary>
 ///     Initializes a new instance of the
 ///     <see>
 ///         <cref>Cranium.Structure.Node.Base</cref>
 ///     </see>
 ///     class. Used by the Serializer
 /// </summary>
 /// <param name='info'>
 ///     Info.
 /// </param>
 /// <param name='context'>
 ///     Context.
 /// </param>
 public Base(SerializationInfo info, StreamingContext context)
 {
     _Value = info.GetDouble("_Value");
     _Error = info.GetDouble("_Error");
     _ParentLayer = (Layer.Base)info.GetValue("_ParentLayer", typeof(Layer.Base));
     _ForwardWeights = (List<Weight.Base>)info.GetValue("_ForwardWeights", typeof(List<Weight.Base>));
     _ReverseWeights = (List<Weight.Base>)info.GetValue("_ReverseWeights", typeof(List<Weight.Base>));
     _ActivationFunction = (ActivationFunction.Base)info.GetValue("_ActivationFunction", typeof(ActivationFunction.Base));
     _NodeID = info.GetInt32("_NodeID");
 }