Sampling from the generator