PatchGAN output channels set equal to in_channels? Change it to 1
Closed this issue · 10 comments
When using multi-channel input, PatchGAN produces multi-channel output. Shouldn't th output be just single channel?
ah fuck that's true, i messed it up, sorry... @surajpaib important for your current experiments.
Took a look at it and yeah makes sense. I'd suggest adding out_channels with a default of 1 and then in_channels as well, rather than hard coding out channels to one.
@cnmy-ro Time for your first PR to master I'd say
where do you think having patchgan with out channels different than 1 would be useful? i think it should always be one, no?
I think it's always 1, as well. Just checked the paper too. As I understood, a regular D outputs just a single scalar probability, but PatchGAN outputs one for each spatial patch of the input. This spatial patch may or maynot contain multiple channels
I'll implement the new dataset and create a PR by tonight. Was just testing things in a Colab notebook (for which I took the Unet2D and PatchGAN2D code from midaGAN) coz don't wanna waste Aachen Cluster's compute
Yeaah didn't realize it affected my experiments since its a no break bug. It's now computing LS on 3 channel output maps, interesting. I wonder how much it affects things
where do you think having patchgan with out channels different than 1 would be useful? i think it should always be one, no?
I think its better to define it as a parameter to make things more explicit. Just a suggestion though ofcourse.
Yeah, great catch!
Thanks! A similar, but different thing - earlier while experimenting with Cityscapes dataset I added an additional parameter "out_channels" for Unet2D and Unet3D. I was trying inputs and outputs having different channels, but out_channels was hard-coded to be equal to in_channels then. I'll create another issue for this.
Nevermind with the new issue actually. Just wanted to mention this change