Fix training function, which refers to model in outside scope.
" train_it = iter(train_dataset.batch(minibatch_size))\n",
" adam = tf.optimizers.Adam()\n",
" for step in range(iterations):\n",
- " elbo = optimization_step(adam, m, next(train_it))\n",
+ " elbo = optimization_step(adam, model, next(train_it))\n",
" if step % 10 == 0:\n",
" logf.append(elbo.numpy())\n",
" return logf"
