junyanz / CycleGAN

Software that can generate photos from paintings, turn horses into zebras, perform style transfer, and more.
Other
12.22k stars 1.94k forks source link

How could I add extra pre-processing operations only to the input of Discriminator? #110

Open HJLYU0519 opened 5 years ago

HJLYU0519 commented 5 years ago

I made some changes to the Discriminator. And I want to add some extra pre-processing operations only to the input of Discriminator. What should I change? And I think there are no preprocessing operations. my reason is this: in data/init.py 75 self.dataloader = torch.utils.data.DataLoader( 76 self.dataset, 77 batch_size=opt.batch_size, 78 shuffle=not opt.serial_batches, 79 num_workers=int(opt.num_threads))

Should I establish another dataloader only for Discriminator? Many thanks for your kind help

junyanz commented 5 years ago

That is one possibility. You can also manually add some preprocessing code before you call the netD.forward. Like here.