Question on using generative adversarial network GAN for numerical data

5 ビュー (過去 30 日間)
tobi alabi
tobi alabi 2021 年 6 月 8 日
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

回答 (0 件)

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by