Beispiel #1
0
        protected bool _componentHasWrongSize(NetComponent componentToAdd)
        {
            if (NumberOfComponents == 0)
            {
                return(false);
            }

            return(_tail.Component.NumberOfOutputs != componentToAdd.NumberOfInputs);
        }
Beispiel #2
0
        protected void _addComponent(NetComponent componentToAdd, bool istrainable)
        {
            if (_componentHasWrongSize(componentToAdd))
            {
                throw new ArgumentException("Attempt to add with inputs size differnt from output size of the last existing Layer");
            }

            _networkComponentNode nodeToAdd = new _networkComponentNode(componentToAdd, istrainable);

            if (_head == null)
            {
                _head = nodeToAdd;
                _tail = _head;
            }
            else
            {
                _tail.Next          = nodeToAdd;
                _tail.Next.Previous = _tail;
                _tail = _tail.Next;
            }
        }
Beispiel #3
0
 public _networkComponentNode(NetComponent component, bool istrainable)
 {
     Component   = component;
     IsTrainable = istrainable;
 }
Beispiel #4
0
 public NetComponentChain(NetComponent component)
     : this()
 {
     AddFixed(component);
 }
Beispiel #5
0
 public void AddFixed(NetComponent componentToAdd)
 {
     _addComponent(componentToAdd, istrainable: false);
 }