/// <summary> /// Instanciate a new layer of input neurons. You'll hardly need to call this as the preferred way to create layers is using the network classes. /// </summary> /// <param name="neuronCount">The count of neurons this input layer shall create.</param> /// <param name="binding">The input data to bind to this input layer.</param> /// <param name="config">The configuration instance.</param> public Layer(ConfigNode node, int neuronCount, double[] binding) { node.AttatchToHost(this); _behavior = LayerBehaviorFlags.Bound; _binding = binding; AddRange(neuronCount); }
/// <summary> /// Instanciate a new layer of input neurons. You'll hardly need to call this as the preferred way to create layers is using the network classes. /// </summary> /// <param name="neurons">A list of neurons to put into this layer.</param> /// <param name="binding">The input data to bind to this input layer.</param> /// <param name="config">The configuration instance.</param> public Layer(ConfigNode node, IEnumerable <Neuron> neurons, double[] binding) { node.AttatchToHost(this); _behavior = LayerBehaviorFlags.Bound; _binding = binding; AddRange(neurons); }
/// <summary> /// Instanciate a new layer of non-input neurons. You'll hardly need to call this as the preferred way to create layers is using the network classes. /// </summary> /// <param name="neurons">A list of neurons to put into this layer.</param> /// <param name="source">The layer that will feed/point to this layer.</param> /// <param name="config">The configuration instance.</param> public Layer(ConfigNode node, IEnumerable <Neuron> neurons, Layer source) { node.AttatchToHost(this); _behavior = LayerBehaviorFlags.Feeded; _sourceLayer = source; AddRange(neurons); source.FeedLayer(this); }
/// <summary> /// Instanciate a new layer of non-input neurons. You'll hardly need to call this as the preferred way to create layers is using the network classes. /// </summary> /// <param name="neuronCount">The count of neurons this layer shall create.</param> /// <param name="source">The layer that will feed/point to this layer.</param> /// <param name="config">The configuration instance.</param> public Layer(ConfigNode node, int neuronCount, Layer source) { node.AttatchToHost(this); _behavior = LayerBehaviorFlags.Feeded; _sourceLayer = source; AddRange(neuronCount); source.FeedLayer(this); }
private void FeedLayer(Layer layer) { _behavior |= LayerBehaviorFlags.Feeding; _targetLayer = layer; if (LayerAppended != null) { LayerAppended(this, new LayerEventArgs(layer)); } }
/// <summary> /// Remove the bindings of this layer's neurons. /// </summary> public void RemoveActivityBinding() { _behavior &= ~LayerBehaviorFlags.Bound; _binding = null; }
/// <summary> /// Bind the activity of this layer's neurons to a double array. /// </summary> /// <param name="source">the array to bind to</param> public void BindActivity(double[] source) { _behavior |= LayerBehaviorFlags.Bound; _binding = source; }
/// <summary> /// Instanciate a new layer of neurons. You'll hardly need to call this as the preferred way to create layers is using the network classes. /// </summary> /// <param name="neuronCount">The count of neurons this layer shall create.</param> /// <param name="config">The configuration instance.</param> public Layer(ConfigNode node, int neuronCount) { node.AttatchToHost(this); _behavior = LayerBehaviorFlags.None; AddRange(neuronCount); }
/// <summary> /// Instanciate a new layer of neurons. You'll hardly need to call this as the preferred way to create layers is using the network classes. /// </summary> /// <param name="neurons">A list of neurons to put into this layer.</param> /// <param name="config">The configuration instance.</param> public Layer(ConfigNode node, IEnumerable <Neuron> neurons) { node.AttatchToHost(this); _behavior = LayerBehaviorFlags.None; AddRange(neurons); }