In MATLAB's 'Train Generative Adversarial Network' example, the final step is to generate new images using the predict function and the following code.
numObservations = 25;
ZNew = randn(numLatentInputs,numObservations,'single');
dlZNew = dlarray(ZNew,'CB');
if (executionEnvironment == "auto" && canUseGPU) || executionEnvironment == "gpu"
dlZNew = gpuArray(dlZNew);
dlXGeneratedNew = predict(dlnetGenerator,dlZNew);
I = imtile(extractdata(dlXGeneratedNew));
I = rescale(I);
The example produces a random sample of 25 images from 5 classes. I want to modify this to request one image from a specific class. For example, generate 5 images for the 'Dandilion' class. Can someone help me understand if it's possible to request specific generator outputs like this? Thanks in advance.