For example, I have 2 tensors below:

a = tensor([[ 4.0155, 3.4703, 4.1574, 3.6536, 3.0531]])

b = tensor([[ 1.0568, 3.8943, -0.1209, 0.6889, 0.3717]])

result:

c = tensor([[ mean(4.0155, 1.0568) , mean(3.4703, 3.8943), mean(4.1574, -0.1209), mean(3.6536, 0.6889), mean(3.0531,0.3717)]])