def sigmoid_cutoff(x, cutoff):
 y = tf.sigmoid(x)
 if (cutoff < 1.01):
  return y
 d = ((cutoff - 1.0) / 2.0)
 return tf.minimum(1.0, tf.maximum(0.0, ((cutoff * y) - d)))

def sigmoid_cutoff ( x , cutoff ) : y = tf . sigmoid ( x ) if ( cutoff < 1.01 ) : return y d = ( ( cutoff - 1.0 ) / 2.0 ) return tf . minimum ( 1.0 , tf . maximum ( 0.0 , ( ( cutoff * y ) - d ) ) )
sigmoid with cutoff .