ReLU

Henry Lee·2021년 12월 6일
0

Tensorflow

목록 보기
1/2
post-thumbnail

Rectified Linear Unit

f(x)=max(0,x)f(x) = max(0, x)
import tensorflow as tf

tf.keras.activations.relu(x, alpha=0.0, max_value=None, threshold=0.0)

# x는 input tensor.
# alpha는 threshold보다 낮은 값에 곱해줄 기울기.
# max_value는 상한값, 이 이상의 값은 max_value로 한다.
# threshold는 임계값.

활성화 함수 (Activation Function) 중 하나.
sigmoid, tanh 활성화 함수에서 발생하는 경사소실 문제 (Gradient Vanishing Issue)를 해결하기 위한 대안으로 alexnet에서 처음 사용.

가장 보편적인 활성화 함수로, 모르면 일단 '렐루'부터 쓰고 보자.

profile
Today I Learned. AI Engineer.

0개의 댓글