August 2019
Intermediate to advanced
242 pages
5h 45m
English
Now comes one part of the magic behind VAEs: sampling to create the encoding that we will feed into the decoder. For reference, we are building something a little like this:

If you recall from earlier in the chapter, we need to add some noise during the sampling process, and we'll call this noise epsilon. This feeds into our sampled encoding; in Gorgonia, we can implement this with GaussianRandomNode with a mean of 0 and standard deviation of 1 as input parameters:
epsilon := gorgonia.GaussianRandomNode(g, dt, 0, 1, 100, 8)
We then feed this into our formula to create our sampled encoding:
if sz, err = gorgonia.Add(l3, gorgonia.Must(gorgonia.HadamardProd(gorgonia.Must(gorgonia.Exp(l4)), ...
Read now
Unlock full access