Train Generative Adversarial Network (GAN) Example projectAndReshapeLayer
10 次查看(过去 30 天)
显示 更早的评论
New to deep learning here, I was follwing the GAN example from: https://au.mathworks.com/help/deeplearning/ug/train-generative-adversarial-network.html
layersGenerator = [
featureInputLayer(numLatentInputs,'Name','in')
projectAndReshapeLayer(projectionSize,numLatentInputs,'Name','proj');
transposedConv2dLayer(filterSize,4*numFilters,'Name','tconv1')
batchNormalizationLayer('Name','bnorm1')
reluLayer('Name','relu1')
transposedConv2dLayer(filterSize,2*numFilters,'Stride',2,'Cropping','same','Name','tconv2')
batchNormalizationLayer('Name','bnorm2')
reluLayer('Name','relu2')
transposedConv2dLayer(filterSize,numFilters,'Stride',2,'Cropping','same','Name','tconv3')
batchNormalizationLayer('Name','bnorm3')
reluLayer('Name','relu3')
transposedConv2dLayer(filterSize,3,'Stride',2,'Cropping','same','Name','tconv4')
tanhLayer('Name','tanh')];
At the projectAndReshapeLayer() line reading:
'projectAndReshapeLayer' is used in the following examples:
Generate Synthetic Signals Using Conditional Generative Adversarial Network
Include Custom Layer in Network
Train Conditional Generative Adversarial Network (CGAN)
Train Generative Adversarial Network (GAN)
Train Wasserstein GAN with Gradient Penalty (WGAN-GP)
Error in GANtestrun (line 31)
projectAndReshapeLayer(projectionSize,numLatentInputs,'Name','proj');
I tried clicking on the train GAN example, I'm not sure what to make of it. projectionSize is defined at [4 4 512] and numLatentInputs is 100
I don't know what is the cause of error since Matlab isn't showing it.
0 个评论
回答(1 个)
Hrishikesh Borate
2021-7-23
Hi,
One possible reason for the occurrence of the error can be that the code is being executed from a directory where the projectAndReshapeLayer.m file is not located. To counter this error, execute the code from the directory which is accessed when the following command is executed in the Command Window.
openExample('nnet/TrainGenerativeAdversarialNetworkGANExample')
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Prototype Deep Learning Networks on FPGA 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!