Skip to content

Commit

Permalink
Update example
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo-grella committed Nov 1, 2023
1 parent dbdf672 commit e547f4b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/perceptron/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
)

func main() {
x := mat.Scalar(-0.8)
w := mat.Scalar(0.4)
b := mat.Scalar(-0.2)
w := mat.Scalar(3.)
b := mat.Scalar(1.)
x := mat.Scalar(2.)

y := Sigmoid(Add(Mul(w, x), b))
y := Sigmoid(Add(Mul(w, x), b)) // y = sigmoid(w*x + b)

fmt.Printf("y = %0.3f\n", y.Value().Item())
}

0 comments on commit e547f4b

Please sign in to comment.