示例#1
0
        public FeedForwardNet(ref FeedForwardNet copyNet)
        {
            AbstractNode abNode;
            InputNode    inNode = copyNet.InputNode;

            this.InputNode = new InputNode(ref inNode);
            abNode         = (AbstractNode)this.InputNode;
            //original layer
            LayerOfNeurons curOrgLayer = (LayerOfNeurons)inNode.OutputNode;
            //copy layer
            LayerOfNeurons curCpyLayer = new LayerOfNeurons(ref curOrgLayer, ref abNode);

            while (curOrgLayer.OutputNode.GetType() == typeof(LayerOfNeurons))
            {
                curOrgLayer = (LayerOfNeurons)curOrgLayer.OutputNode;
                abNode      = (AbstractNode)curCpyLayer;
                curCpyLayer = new LayerOfNeurons(ref curOrgLayer, ref abNode);
            }
            abNode          = (AbstractNode)curCpyLayer;
            this.OutputNode = new OutputNode(ref abNode);
        }
示例#2
0
        public override AbstractNet copy()
        {
            FeedForwardNet tempNet = this;

            return(new FeedForwardNet(ref tempNet));
        }