Round of floating point value of tensor

You could do something like this

n_digits = 3
rounded = (x * 10**n_digits).round() / (10**n_digits)

from this forum post but it will keep the zeros at the end.