August 2019
Intermediate to advanced
242 pages
5h 45m
English
Just like before, we need to consider our input and output. We are using MNIST again, since encoding digits is a useful feature. As such, we know that our input is 784 pixels, and we know that our output must also have 784 pixels.
Since we already have helper functions to decode our input and output into tensors, we can just leave that work aside and go straight to our neural network. Our network is as follows:

We can reuse most of our code from the last example and just change up our layers:
func newNN(g *gorgonia.ExprGraph) *nn { // Create node for w/weight w0 := gorgonia.NewMatrix(g, dt, gorgonia.WithShape(784, 128), gorgonia.WithName("w0"), ...Read now
Unlock full access