How to calculate a logistic sigmoid function in Python?

后端 未结 15 1867
情话喂你
情话喂你 2020-11-29 16:14

This is a logistic sigmoid function:

\"enter

I know x. How can I calculate F(x

15条回答
  •  鱼传尺愫
    2020-11-29 17:09

    Tensorflow includes also a sigmoid function: https://www.tensorflow.org/versions/r1.2/api_docs/python/tf/sigmoid

    import tensorflow as tf
    
    sess = tf.InteractiveSession()
    x = 0.458
    y = tf.sigmoid(x)
    
    u = y.eval()
    print(u)
    # 0.6125396
    

提交回复
热议问题