Hello Everyone !
I am doing one problem which aims in improving the semantic segmentation pixelwise results. The approach requires two networks (1. CNN 2. MLP), which are concatenated. The output of net1 i.e. CNN is 3 numbers , which are then serves as input to net2 i.e. MLP. The output of net2 (MLP) is a single number (not an array or higher dimensional tensor), at the output of net2, MSE Loss is calculated.
Now I have to backpropagate and update the gradients of both networks using the calculated MSE loss. The backpropagation of net2 is straight forward, i.e. loss.backward(), but how to do backpropagation of net1 using the gradients of net2 ?