Question on using generative adversarial network GAN for numerical data

4 views (last 30 days)
Dear All,
Please, i need your support on generative Adversarial Network, i want to use the model on numerical data, but the examples provided by matlab is on image data.
Question 1
As described in the code below, how do i choose the numLatentInputs if i am working on numerical data??
Concerning the projectionSize = [4 4 512]; Please, how do i apply for numerical data
Question 2.
A minibatchqueue function and preprocessing function were introduced has shown the second code below to process and manage mini-batches of data. Since this is applicable for image data, how can i implement minibatches on numerical data?
PS: the data i'm working on has three variables with 100 timestep each.
Thanks.
The link below is the entire code for generative adversarial network (GAN) for images provided by Matlabhttps://www.mathworks.com/help/deeplearning/ug/train-generative-adversarial-network.html
filterSize = 5;
numFilters = 64;
numLatentInputs = 100;
projectionSize = [4 4 512];
layersGenerator = [
featureInputLayer(numLatentInputs,'Name','in')
projectAndReshapeLayer(projectionSize,numLatentInputs,'Name','proj');
%% other codes excluded%%.....
augimds.MiniBatchSize = miniBatchSize;
executionEnvironment = "auto";
mbq = minibatchqueue(augimds,...
'MiniBatchSize',miniBatchSize,...
'PartialMiniBatch','discard',...
'MiniBatchFcn', @preprocessMiniBatch,...
'MiniBatchFormat','SSCB',...
'OutputEnvironment',executionEnvironment);
%.....other codes excluded.....
function X = preprocessMiniBatch(data)
% Concatenate mini-batch
X = cat(4,data{:});
% Rescale the images in the range [-1 1].
X = rescale(X,-1,1,'InputMin',0,'InputMax',255);
end

Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!