Exemplo n.º 1
0
        public FPBinLeNetTest()
        {
            conv1 = new FPConv2d(1, 20, 5, 1, 0);
            pool1 = new MaxPool2d(2, 2);

            conv2 = new BinConv2d(20, 50, 5, 1, 0, fpBn: true);
            pool2 = new MaxPool2d(2, 2);
            //fc1 = new BinLinear(50 * 4 * 4, 500, false, true);
            fc1 = new FPBinLinear(50 * 4 * 4, 500, false);
            fc2 = new FPLinear(500, 10, true);
            bn1 = new FPBatchNorm2d(20);
            bn2 = new FPBatchNorm2d(50);
            bn3 = new FPBatchNorm1d(500);



            conv1.Name = "conv1";
            pool1.Name = "pool1";
            pool2.Name = "pool2";
            conv2.Name = "conv2";
            fc1.Name   = "fc1";
            fc2.Name   = "fc2";
            bn1.Name   = "bn1";
            bn2.Name   = "bn2";
            bn3.Name   = "bn3";
            items.Add(bn1);
            items.Add(bn2);
            items.Add(bn3);
            items.Add(fc2);
            items.Add(fc1);
            items.Add(conv1);
            items.Add(conv2);
            items.Add(pool1);
            items.Add(pool2);
        }