How are the values updated by default? Will it just be an average of the 3 gradients as if they form a batch in gradient descent?

but if your final network output still has that 3 element dimension

What if the output has a 1 element dimension, then how will the previous layers with 3 elements train?

…having weighted samples

How do you do that in pytorch?
Thank you for your help