Hi,
I am wondering is there a efficient way to perform group averaging in a tensor.
Take 1-D vector as a sample:
vector: [1, 2, 3, 4, 5, 6]
group_label:[1, 2, 1, 2, 3, 3]
results:[2, 3, 5.5 ]
The ideas is that values in a tensor with same group label will be averaged and produce a new tensor.