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); }
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); }