PyTorch Forums
Compute the weighted average in PyTorch
sadra-barikbin
(Sadra Barikbin)
May 11, 2022, 7:46am
2
Yes, that’s correct. To write it shorter:
weighted_average = (A@W)/W.sum()
How does the @ sign work in this instance?
show post in topic