anchor.diff:  dsharp.config(backend=Backend.Torch, device=Device.CPU)
   dsharp.seed(0)
   
  -let trainSet = MNIST("./mnist", train=true, transform=id)
  -let trainLoader = trainSet.loader(batchSize=32, shuffle=true)
  +let batchSize = 32
  +let validInterval = 250
  +let numSamples = 32
   
  -let model = VAE(28*28, 16, [512; 256])
  -printfn "%A" model
  +let trainSet = MNIST("../data", train=true, transform=id)
  +let trainLoader = trainSet.loader(batchSize=batchSize, shuffle=true)
  +let validSet = MNIST("../data", train=false, transform=id)
  +let validLoader = validSet.loader(batchSize=batchSize, shuffle=false)
  +
  +let model = VAE(28*28, 20, [400])
  +printfn "Model: %A" model
   
   let optimizer = Adam(model, lr=dsharp.tensor(0.001))
   
  
positive.code:         let logVar = enc.[enc.Length-1].forward(x)
          mu, logVar
  
      let latent mu (logVar:Tensor) =
          let std = dsharp.exp(0.5*logVar)
          let eps = dsharp.randnLike(std)
          eps.mul(std).add(mu)
  
negative.code:         let kl = -0.5 * dsharp.sum(1. + logVar - mu.pow(2.) - logVar.exp())
          bce + kl
  
      member m.loss(x, ?normalize:bool) =
          let normalize = defaultArg normalize true
          let xRecon, mu, logVar = m.encodeDecode x
          let loss = VAE.loss(xRecon, x, mu, logVar)
          if normalize then loss / x.shape.[0] else loss
  
      member _.sample(?numSamples:int) = 
          let numSamples = defaultArg numSamples 1
  