Round of floating point value and backpropagation

Does something like a custom round function that actually uses the gradient of the original tensor work? Torch.round() gradient - #6 by Zhongzhi_Yu