function generateLatentVector(fixedLatent) {
  const latentDims = latentSliders.length;

  // Generate random latent vector (a.k.a, z-space vector).
  const latentValues = [];
  for (let i = 0; i < latentDims; ++i) {
    const latentValue = fixedLatent === true ? 0.5 : Math.random();
    latentValues.push(latentValue);
    latentSliders[i].value = latentValue;
  }
}
Generate values for the latent vector and show them with the sliders.

@param {bool} fixedLatent Whether to use fixed value for the latent
  vector (0.5 for every dimension).