ptrblck:

torch.set_printoptions(precision=6)


these are some of the results of the output_teacher_batch.data.cpu():

5.889701 -2.200435 2.725899  …
-1.187858 -2.000502 1.003952  …
0.092105 -1.677588 -0.427267  …
…               ⋱
and these are the corresponding results of the  output_teacher_batch.data.cpu().numpy():
2.333767890930175781e+00 1.281759548187255859e+01 -1.557306051254272461e+00 …
-1.450318336486816406e+00 -3.302952051162719727e+00 4.208591461181640625e+00 …
-5.082679986953735352e-01 -2.980945587158203125e+00 -1.338094949722290039e+00 …

it does not seem that the precision be the problem