How to use ready network and generate data?

Hi, I’m new in pytorch as well as in deep learning.
I have used this repository: GitHub - LixiangHan/GANs-for-1D-Signal: implementation of several GANs with pytorch (dcgan is part im interested in) I changed training set for my needs and it performed pretty well. Now I would like to use trained generator to generate data and test it. Some research I have performed didn’t help me to find out how to do that…

Could anyone look at this code and give me some tips? Maybe answer is simple and obvious or
maybe there are some good articles/resources that could help me make progress.
After training a .pkl file is created. I was wondering If this might help?

After training the models, you could create a new Generator and load the trained state_dict via:

netG = Generator()

Afterwards, you could execute the forward pass using the same inputs as were used to train this model:

with torch.no_grad():
    noise = torch.randn(b_size, nz, 1, device=device)
    fake = netG(noise)
1 Like