Skip to content

Commit b4bf00c

Browse files
committed
Fixed comments in the Gorgonia code to go with @dwhitena's comments about idiomatic go comments
1 parent 6c19ca8 commit b4bf00c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

content/post/deeplearning_in_go_part_1.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,24 +222,25 @@ So instead of the program above, we'd create something like this:
222222

223223
```go
224224
func main() {
225-
// create a graph
225+
// Create a graph.
226226
g := G.NewGraph()
227227

228-
// create a node called "x" with the value 1
228+
// Create a node called "x" with the value 1.
229229
x := G.NodeFromAny(g, 1, G.WithName("x"))
230230

231-
// create a node called "y" with the value 1
231+
// Create a node called "y" with the value 1.
232232
y := G.NodeFromAny(g, 1, G.WithName("y"))
233233

234234
// z := x + y
235235
z := G.Must(G.Add(x, y))
236236

237-
// create a VM to execute the graph
237+
// Create a VM to execute the graph.
238238
vm := G.NewTapeMachine(g)
239+
239240
// Run the VM. Errors are not checked.
240241
vm.RunAll()
241242

242-
// print the value of z
243+
// Print the value of z.
243244
fmt.Printf("%v", z.Value())
244245
}
245246
```

0 commit comments

Comments
 (0)