Training Generative Adversarial Networks (GANs)
조회 수: 6 (최근 30일)
이전 댓글 표시
Here I have a GAN example
Here is the source of the case:
The structure of the generator is
filterSize = 5;
numFilters = 64;
numLatentInputs = 100;
projectionSize = [4 4 512];
layersGenerator = [
featureInputLayer(numLatentInputs)
projectAndReshapeLayer(projectionSize)
transposedConv2dLayer(filterSize,4*numFilters)
batchNormalizationLayer
reluLayer
transposedConv2dLayer(filterSize,2*numFilters,Stride=2,Cropping="same")
batchNormalizationLayer
reluLayer
transposedConv2dLayer(filterSize,numFilters,Stride=2,Cropping="same")
batchNormalizationLayer
reluLayer
transposedConv2dLayer(filterSize,3,Stride=2,Cropping="same")
tanhLayer];
The following error appears in the command line window:
'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 s3 (line 39)
projectAndReshapeLayer(projectionSize,numLatentInputs,'Name','proj');
I don't know why the error occurred? Hopes they can be informed
댓글 수: 0
답변 (1개)
Amey Waghmare
2023년 1월 4일
Hi,
As per my understanding, you are facing an error for ‘projectAndReshapeLayer' while following the example Train Generative Adversarial Network (GAN).
‘projectAndReshapeLayer’ is a custom layer, and is provided as a part of this example, as mentioned in ‘Define Generative Adversarial Network’ section. In order to use this custom layer, you can open this example in MATLAB as a live script by typing the following in the Command Window,
openExample('nnet/TrainGenerativeAdversarialNetworkGANExample')
This will add the ‘projectAndReshapeLayer’ in the MATLAB path.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!