junyanz / pytorch-CycleGAN-and-pix2pix

Image-to-Image Translation in PyTorch
Other
23.09k stars 6.32k forks source link

How can I train with multi-input like (A1 ,A2……)->B? #1640

Open kuhhg opened 7 months ago

kuhhg commented 7 months ago

How can I train with multi-input like (A1 ,A2)->B? I used to try torch.cat to conbine (A1,A2,,A3,A4) but it would change the channel into 4 and get an error. When I try to change the input_nc =1 and output_nc =4, the error told me assert(opt.input_nc == opt.output_nc). So, how can I use more then 2 input into the train?

prabathbr commented 7 months ago

you need to disable identity_loss when using different input & output channel numbers as per paper