I am trying to design a GAN using the example provided by matlab, however the data I'm using to train it are 150x105 grayscal images and in the example they are using 64x64 rgb. Could anyone sugest how can I change the output of the generator to 150x105x1 here? From what i understood, it's doable by eitheer changing the projectionSize or doing something witht the last convolution layer, yet isn't clear what exacly. If this could help, here's the tutorial link and the code provided for the generator with a 64x64x3 output: https://ch.mathworks.com/help/deeplearning/ug/train-generative-adversarial-network.html
numFilters = 32;
numLatentInputs = 100;
projectionSize = [4 4 512];
layersGenerator = [
featureInputLayer(numLatentInputs, 'Normalization', 'none')
projectAndReshapeLayer(projectionSize)
transposedConv2dLayer(filterSize, 2*numFilters, 'Name', 'tconv1')
batchNormalizationLayer('Name', 'bn1')
reluLayer
transposedConv2dLayer(filterSize, numFilters, 'Stride', 2, 'Cropping', 'same', 'Name', 'tconv2')
batchNormalizationLayer('Name', 'bn2')
reluLayer
transposedConv2dLayer(filterSize, 1, 'Stride', 2, 'Cropping', 'same', 'Name', 'tconv3')
tanhLayer('Name', 'tanh')];
netG = dlnetwork(layersGenerator);