How to write pytorch code for one encoder with two decoders?

Hello all,
I want to implement in PyTorch a generator with encoder-two decoders architecture and then pass the outputs of the decoders (images) to a discriminator. First of all, is that feasible? If yes, how to do it?
Thanks in advance.

I don’t think I understand the proposed model architectures completely, but would claim your idea is feasible since you can combine models as you wish. As long as you don’t detach the computation graph (e.g. via rewrapping a tensor, using another library such as numpy etc.) it should work.

1 Like