フィルターのクリア

Training Generative Adversarial Networks (GANs)

7 ビュー (過去 30 日間)
叔濯
叔濯 2022 年 12 月 31 日
回答済み: Amey Waghmare 2023 年 1 月 4 日
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

回答 (1 件)

Amey Waghmare
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.

カテゴリ

Help Center および File ExchangeBuild Deep Neural Networks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by