K
K
kaktak2552020-08-30 00:25:03
Python
kaktak255, 2020-08-30 00:25:03

Neural network. How to translate activation function formulas into python code?

The maximum number of activation functions is needed, in these searches I wandered onto Wikipedia https://ru.wikipedia.org/wiki/Activation_function , when I saw the graphs and formulas, I was delighted, here they are, what I was looking for. Then I realized that I can’t translate them into Python code, because I don’t understand at all what goes where and how.
The only thing I have is the sigmoid:

def sigmoid(x):  
    return math.exp(-np.logaddexp(0, -x))


At first, I searched the Internet for activation functions in the form of code, but I did not find anything except for the sigmoid.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2020-08-30
@dimonchik2013

learn Python
modules Numpy and Math, or better immediately scikit-learn

D
dmshar, 2020-08-30
@dmshar

If "I know Python, I don't understand the formula" - then you need to learn math. For one thing - go to topics like "do you need math for machine learning" and write your opinion.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question