March 25, 2024, 9:17 a.m. | /u/mono1110

Deep Learning www.reddit.com

I am trying to implement DCGAN using pytorch.

I am sample noise z using `torch.randn(batch_size, latent_dim)` where batch\_size=128 and latent\_dim is 100.

If I follow the original DCGAN paper, and if I understand correctly, I should pass z through a Linear layer to project it and then reshape it according to (channel, height, width) for next layers. This I am doing like this.

proj = nn.Linear(latent_dim, 4*4*1024)
x = proj(z)
x = x.view(batch_size, 1024, 4, 4)
#then pass through generator …

architecture dcgan deeplearning layer linear noise paper project pytorch question reshape sample through torch

Data Architect

@ University of Texas at Austin | Austin, TX

Data ETL Engineer

@ University of Texas at Austin | Austin, TX

Lead GNSS Data Scientist

@ Lurra Systems | Melbourne

Senior Machine Learning Engineer (MLOps)

@ Promaton | Remote, Europe

Reporting & Data Analytics Lead (Sizewell C)

@ EDF | London, GB

Data Analyst

@ Notable | San Mateo, CA