I can't understand the generator network of the Train Generative Adversarial Network (GAN) example

조회 수: 3 (최근 30일)
In the first layer of transposed convolution, why does it not use 'Stride',2,'Cropping','same' like the following layers? I think the width and height of the input is 4x4 so it needs to be enlarged by a factor of 2 for 4 times to get a size of 64x64. But in this code, I think it only enlarges the input by a factor of 2 for 3 times. Could you please help me understand this?
By the way, why it says 'Converts the random vectors of size 100 to 7-by-7-by-128 arrays using a project and reshape layer' but the projection size in the code is [4 4 512]?

답변 (1개)

Ben
Ben 2024년 4월 9일
The documentation for transposedConv2dLayer states in the Algorithms section that the input is padded with zeros up to "filter edge size minus 1". I think this explains why the 4x4 input becomes 8x8. To see this, call analyzeNetwork(netG) on the generator in the example.
The statement "Converts the random vectors of size 100 to 7-by-7-by-128 arrays using a project and reshape layer" isn't in the current version of the example, perhaps it was a typo in an old version.

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by