示例#1
0
        /// <summary>
        /// Increase the hidden layer counts according to the hidden layer
        /// parameters. Increase the first hidden layer count by one, if it is maxed
        /// out, then set it to zero and increase the next hidden layer.
        /// </summary>
        ///
        /// <returns>False if no more increases can be done, true otherwise.</returns>
        private bool IncreaseHiddenCounts()
        {
            lock (this)
            {
                int i = 0;
                do
                {
                    HiddenLayerParams param = _hidden[i];
                    _hiddenCounts[i]++;

                    // is this hidden layer still within the range?
                    if (_hiddenCounts[i] <= param.Max)
                    {
                        return(true);
                    }

                    // increase the next layer if we've maxed out this one
                    _hiddenCounts[i] = param.Min;
                    i++;
                } while (i < _hiddenCounts.Length);

                // can't increase anymore, we're done!

                return(false);
            }
        }
 /// <summary>
 /// Add a hidden layer's min and max. Call this once per hidden layer.
 /// Specify a zero min if it is possible to remove this hidden layer.
 /// </summary>
 ///
 /// <param name="min">The minimum number of neurons for this layer.</param>
 /// <param name="max">The maximum number of neurons for this layer.</param>
 public void AddHiddenLayer(int min, int max)
 {
     var param = new HiddenLayerParams(min, max);
     _hidden.Add(param);
 }
示例#3
0
        /// <summary>
        /// Add a hidden layer's min and max. Call this once per hidden layer.
        /// Specify a zero min if it is possible to remove this hidden layer.
        /// </summary>
        ///
        /// <param name="min">The minimum number of neurons for this layer.</param>
        /// <param name="max">The maximum number of neurons for this layer.</param>
        public void AddHiddenLayer(int min, int max)
        {
            var param = new HiddenLayerParams(min, max);

            _hidden.Add(param);
        }
示例#4
0
 public void AddHiddenLayer(int min, int max)
 {
     HiddenLayerParams item = new HiddenLayerParams(min, max);
     this._xab3ddaff42dd298a.Add(item);
 }