LoginSignup
11
6

More than 5 years have passed since last update.

オーバーフローエラーフリーなシグモイド関数

Last updated at Posted at 2016-10-21
import numpy as np
sigmoid = lambda x: 1 / (1 + np.exp(-np.clip(x,-709,100000)))

(誤りがあったので訂正しました)

11
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
6