def logit(x):
 x = tf.convert_to_tensor(x)
 dependencies = [tf.assert_positive(x), tf.assert_less(x, 1.0)]
 x = control_flow_ops.with_dependencies(dependencies, x)
 return (tf.log(x) - tf.log((1.0 - x)))

def logit ( x ) : x = tf . convert_to_tensor ( x ) dependencies = [ tf . assert_positive ( x ) , tf . assert_less ( x , 1.0 ) ] x = control_flow_ops . with_dependencies ( dependencies , x ) return ( tf . log ( x ) - tf . log ( ( 1.0 - x ) ) )
evaluate :math:log(x / ) elementwise .