// Линейный энкодер
        private void creatLin_Click(object sender, EventArgs e)
        {
            lin = true;

            nnw = new NNW();
            nnw.AddNewLayer(new Shape(n), new FeedForwardLayer(h));
            nnw.AddNewLayer(new FeedForwardLayer(n));

            CreateMeneger();
        }
예제 #2
0
        public ComplexNet()
        {
            InitializeComponent();
            t = new Vector(n);

            double dt = 1.0 / n;

            for (int i = 1; i < n; i++)
            {
                t[i] = t[i - 1] + dt;
            }
            NNW.AddNewLayer(new Shape(n), new ComplexFeedForwardLayer(20, new CSigmoidUnit()));
            NNW.AddNewLayer(new ComplexFeedForwardLayer(outp, new CLinearUnit()));
        }
예제 #3
0
        public ImitComplex()
        {
            InitializeComponent();
            t = new Vector(n);

            double dt = 1.0 / n;

            for (int i = 1; i < n; i++)
            {
                t[i] = t[i - 1] + dt;
            }

            NNW.AddNewLayer(new Shape(n), new FeedForwardLayer(100, new ReLU(0.1)));
            NNW.AddNewLayer(new ReShape(new Shape(10, 1, 2)));               // Разделение на реальную и мнимую часть
            NNW.AddNewLayer(new BatchReNormalization());
            NNW.AddNewLayer(new FeedComplexLayer(1000, new EliotSigUnit())); // Комплексный слой
            NNW.AddNewLayer(new DropOut(0.85));
            NNW.AddNewLayer(new Flatten());                                  // Соединение реальной и мнимой части
            NNW.AddNewLayer(new FeedForwardLayer(outp, new SigmoidWithBCE()));
            Console.WriteLine(NNW);
        }
        //Сверточный энкодер
        private void creatConv_Click(object sender, EventArgs e)
        {
            lin = false;


            nnw = new NNW();
            nnw.AddNewLayer(new Shape(n), new Conv1D(3, 8, new ReLU(0.1)));
            nnw.AddNewLayer(new MaxPool1D());
            nnw.AddNewLayer(new Conv1D(3, 16, new ReLU(0.1)));
            nnw.AddNewLayer(new MaxPool1D());
            nnw.AddNewLayer(new Conv1D(3, 16, new ReLU(0.1)));
            nnw.AddNewLayer(new MaxPool1D());
            nnw.AddNewLayer(new Flatten());

            nnw.AddNewLayer(new FeedForwardLayer(h));
            nnw.AddNewLayer(new FeedForwardLayer(64, new ReLU(0.1)));


            nnw.AddNewLayer(new UpSampling1D());
            nnw.AddNewLayer(new Conv1D(3, 32, new ReLU(0.1))
            {
                IsSame = true
            });
            nnw.AddNewLayer(new UpSampling1D());
            nnw.AddNewLayer(new Conv1D(3, 16, new ReLU(0.1))
            {
                IsSame = true
            });
            nnw.AddNewLayer(new UpSampling1D());
            nnw.AddNewLayer(new Conv1D(3, 1, new LinearUnit())
            {
                IsSame = true
            });


            CreateMeneger();
        }