Based on the current code, I assume that the input batch will be used T times.
However, I don’t know, where the mean is calculated, as the code is not formatted properly (i.e. where are output_mean and the following operations used).