code: def compute_samples(self):
          
          shape = [self.batch_size, self.eq_samples, self.iw_samples, self.num_latent]
          mu = tf.nn.sigmoid(self.mu)
          z = tf.select(tf.random_uniform(shape) - mu > 0, tf.ones(shape), tf.zeros(shape))
          return z
docs: Sample from a Normal distribution with inferred mu and std