Beispiel #1
0
        /// <summary>
        /// Add Pooling
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Add_Pooling(object sender, RoutedEventArgs e)
        {
            //network_canvas.Add_Pooling();
            //net_canvas.Children.Add(new LayerPooling());
            var newNode = new LayerPooling();

            newNode.seq_id = numberOfNode + 1;
            numberOfNode++;
            net_canvas.Children.Add(newNode);
            Nodes.Add(newNode);
        }
Beispiel #2
0
        public void CreateLayNet(TrainParameters layNetParameter)
        {
            LayerNet = new List <Layer>();
            var inputLayer = new LayerInput(InputDataShape)
            {
                LayerIndex = 0
            };

            LayerNet.Add(inputLayer);
            layNetParameter.InterLayerStructs.ToList().ForEach(a =>
            {
                var dataShape = LayerNet.Last().ShapeOut;
                switch (a.LayerType)
                {
                case LayerType.FullConnectLayer:
                    var fullConnectedLayer = new LayerFullConnected(dataShape, a.NeureCount)
                    {
                        LayerIndex = LayerNet.Count
                    };
                    LayerNet.Add(fullConnectedLayer);
                    break;

                case LayerType.PoolingLayer:
                    var poolingLayer = new LayerPooling(dataShape)
                    {
                        LayerIndex = LayerNet.Count
                    };
                    LayerNet.Add(poolingLayer);
                    break;
                }
            });
            var outputLayer = new LayerOutput(LayerNet.Last().ShapeOut, OutputDataShape)
            {
                LayerIndex = LayerNet.Count
            };

            LayerNet.Add(outputLayer);
        }