How to share y_hat on a batch with multi optimizers?
I tried to implement EdgeConnect with pytorch-lightning, and my implementation is this.
But, this code is very slow in training because very heavy generator is called by 2 times.
While I want to share y_hat(outputs) on a batch, I have no idea.
Fast training implementation which is forcibly is here (this is not elegant code...).
How to use pytorch-lightning functions?
Thank you