Differentiable round function in Tensorflow?

前端 未结 6 1111
面向向阳花
面向向阳花 2021-02-04 20:27

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

6条回答
  •  無奈伤痛
    2021-02-04 21:04

    Something along the lines of x - sin(2pi x)/(2pi)?

    I'm sure there's a way to squish the slope to be a bit steeper.

提交回复
热议问题