Mish

1 개요

이미지 채널 값의 Mish 함숫값 또는 미분값을 반환하는 알고리즘입니다.

Mish
Graph
Fig. Plot of Mish function.

2 알고리즘 상세 설명

Forward 모드

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

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

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

Mish(x)=xtanh(ln(1+ex))\text{Mish}(x) = x \cdot \tanh (\ln (1 + e^{x}))

Backward 모드

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

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

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

Mish(x)=tanh(ln(1+ex))+x(1tanh2(ln(1+ex)))ex1+ex\text{Mish}'(x) = \tanh (\ln (1 + e^{x})) + x \cdot (1 - \tanh^2 (\ln (1 + e^{x}))) \cdot \frac{e^{x}}{1 + e^{x}}

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

Operation Mode 설정

4 예제 코드

COperationMish mish;

CFLImage fliSourceImage;
CFLImage fliDestinationImage;

mish.SetSourceImage(fliSourceImage);
mish.SetDestinationImage(fliDestinationImage);
mish.SetOperationMode(COperationMish::EOperationMode_Forward);

mish.Execute();
COperationMish mish = new COperationMish();

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

mish.SetSourceImage(ref fliSourceImage);
mish.SetDestinationImage(ref fliDestinationImage);
mish.SetOperationMode(COperationMish.EOperationMode.Forward);

mish.Execute();

5 기타 사항

Supported Feature

Supported Format

Overflow Method

Overflow 가 발생하지 않습니다.

6 관련 알고리즘

ReLU PReLU ELU Softplus Sigmoid Swish Soft Shrinkage Hard Shrinkage