I have a network that spits out 5 tensors of equal dimensions. Each tensor represents a segmented output of the same image.
I want to also train part of the network to take the weighted average of these tensors. How would I take the average of these tensors? Would I used an
nn.Conv2d after concatenating them?
The idea I have in my head is something like:
Output of network:
t1, t2, t3, t4, t5
(x1 * t1 + x2 * t2 + x3 * t3 + x4 * t4 + x5 * t5) / (x1 + x2 + x3 + x4 + x5), where
xi are the weights, and
ti are the tensor outputs from the network.
Any advice appreciated.