ptrblck:

In Encoding you are creating new, randomly initialized, Residual modules inside the forward method, which will cause the difference in the outputs.


First, I appreciate your help very much and thank you. Second, based on your response, initialisation of the “Residual” module in the “forward” method of the “Deccoding” block is also part of the problem as I am using it not only in the “Encoding” block but in the “Decoding” block too! Consequently, that means the weights and biases in the convolution layers of the “Residual” block are NEVER trained properly because they are randomly initialised every single time the “Residual” block is called/initialised! Is my understanding correct?
Finally, to fix the “Residual” block issue I need help! Should I accept your response as solution and open a new thread with a different title? Or can we continue with this thread?