+
+ # FIXME input_as_float should not be necessary but there
+ # are weird memory leaks going on, which do not seem to be
+ # my fault
+ if b == 0:
+ input_as_float = input.float()
+ else:
+ input_as_float.copy_(input)
+ acc += input_as_float.sum() / input.numel()
+ acc_sq += input_as_float.pow(2).sum() / input.numel()
+