Example #1
0
        public static FTile SquareError()
        {
            var layer = new FTile();

            var(input, res)            = FSymbol.New("input", "res");
            layer.Sum((i, j) => res[i] = input[j] * input[j]);

            return(layer);
        }
Example #2
0
        public static FTile Dense()
        {
            var layer = new FTile();

            var(input, w, b, res)      = FSymbol.New("input", "W", "b", "res");
            layer.Sum((i, j) => res[i] = w[i, j] * input[j] + b[i]);
            layer.Sum(i => res[i]      = Activations.ReLU(res[i]));

            return(layer);
        }