So the output of my network is a list of propabilities, which I then round using tf.round() to be either 0 or 1, this is crucial for this project. I then found out that tf.roun
This works for me:
x_rounded_NOT_differentiable = tf.round(x) x_rounded_differentiable = (x - (tf.stop_gradient(x) - x_rounded_NOT_differentiable))