Softplus

1 개요

이미지 채널 값의 Softplus(Rectified Linear Unit) 함숫값 또는 미분값을 반환하는 알고리즘입니다.

Softplus
Graph
Fig. Plot of Softplus function.

2 알고리즘 상세 설명

Forward 모드

Source 이미지 픽셀 각 채널 값의 Softplus 함숫값을 계산하여 출력합니다.
아래의 Figure 는 [-1, 1] 범위의 float 이미지에 적용한 예시를 보여줍니다.

Source Image Destination Image
Source Image Destination Image
Fig. Source and destination images. (forward mode)

yn=Softplus(xn)y_{n} = \text{Softplus}(x_{n})

Softplus(x)=ln(1+ex)\text{Softplus}(x) = \ln {(1 + e^{x})}

Backward 모드

Source 이미지 픽셀 각 채널 값의 Softplus 미분값을 계산하여 출력합니다.
아래의 Figure 는 [-1, 1] 범위의 float 이미지에 적용한 예시를 보여줍니다.

Source Image Destination Image
Source Image Destination Image
Fig. Source and destination images. (backward mode)

yn=Softplus(xn)y_{n} = \textnormal{Softplus}'(x_{n})

Softplus(x)=ex1+ex\text{Softplus}'(x) = \frac{e^{x}}{1+e^x}

3 파라미터 설정 및 사용 방법

Operation Mode 설정

4 예제 코드

COperationSoftplus softplus;

CFLImage fliSourceImage;
CFLImage fliDestinationImage;

softplus.SetSourceImage(fliSourceImage);
softplus.SetDestinationImage(fliDestinationImage);
softplus.SetOperationMode(COperationSoftplus::EOperationMode_Forward);

softplus.Execute();
COperationSoftplus softplus = new COperationSoftplus();

CFLImage fliSourceImage = new CFLImage();
CFLImage fliDestinationImage = new CFLImage();

softplus.SetSourceImage(ref fliSourceImage);
softplus.SetDestinationImage(ref fliDestinationImage);
softplus.SetOperationMode(COperationSoftplus.EOperationMode.Forward);

softplus.Execute();

5 기타 사항

Supported Feature

Supported Format

Overflow Method

Overflow 가 발생하는 경우 Clamping 처리 됩니다.

6 관련 알고리즘

ReLU PReLU ELU Sigmoid Swish Mish Soft Shrinkage Hard Shrinkage