August 2019
Intermediate to advanced
242 pages
5h 45m
English
The easiest way to understand how this all fits together is by building a simple example.
To start, let's implement a simple graph to add two numbers together—basically, this would be: c = a + b:
package mainimport ( "fmt" "log" . "gorgonia.org/gorgonia" )
func main() { g := NewGraph()}
a = NewScalar(g, Float64, WithName("a"))b = NewScalar(g, Float64, WithName("b"))
c, err = Add(a, b)if err != nil { log.Fatal(err) }
Note that c will not actually have a value now; we've just ...
Read now
Unlock full access