You cannot backprop through round.
You  could take the (square, or something) difference of z and y, i.e. solving a regression problem.
Regression on class numbers doesn’t work particularly well for classification in general. (We would not be making the distinction if it did.)

Best regards
Thomas