async function generate(decoderModel, latentDimSize) {
  const targetZ = tf.zeros([latentDimSize]).expandDims();
  const generated = (decoderModel.predict(targetZ));

  await previewImage(generated.dataSync());
  tf.dispose([targetZ, generated]);
  }
Generate an image and preview it on the console.

@param {tf.LayersModel} decoderModel Decoder portion of the VAE.
@param {number} latentDimSize Dimensionality of the latent space.