Train Generative Adversarial Network (GAN) Example projectAndReshapeLayer
11 ビュー (過去 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 で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!