728x90
반응형
SMALL
Sigmoid
import numpy as np
def sigmoid(x):
return 1/(1+np.exp(-x))
sigmoid(4)
0.9820137900379085
import matplotlib.pyplot as plt
x = np.arange(-10, 10, 0.01)
y = sigmoid(x)
plt.plot(x, y)
ReLU
def relu(x):
return np.maximum(0, x)
x = np.arange(-10, 10, 0.01)
y = relu(x)
plt.plot(x, y)
Softmax
def origin_softmax(x):
f_x = np.exp(x) / np.sum(np.exp(x))
return f_x
x = np.array([1.3, 5.1, 2.2, 0.7, 1.1])
y = origin_softmax(x)
plt.plot(x, y)
728x90
반응형
LIST
'Learning-driven Methodology > DL (Deep Learning)' 카테고리의 다른 글
[Deep Learning] 방사형 기저 함수 신경망 (Radial Basis Function Network) (0) | 2023.07.17 |
---|---|
[Deep Learning] 베이지안 하이퍼파라미터 최적화 (Bayesian Hyperparameter Optimization) (0) | 2023.05.26 |
[Deep Learning] Global Average Pooling (GAP) (0) | 2022.08.14 |
[Deep Learning] 전이 학습 (Transfer Learning) (4) (0) | 2022.06.21 |
[Deep Learning] 전이 학습 (Transfer Learning) (3) (0) | 2022.06.21 |