The mean tensor has the shape [1, 128] as it’s calculated by x.sum(1).
However, x[mask] has a variable number of elements so how should the assignment work?
E.g. lets assume mask samples 5120 True values, thus x[mask] would have the shape [5120].
How should the 128 values of mean be assigned to which value?