Main Content

tanhLayer

쌍곡탄젠트(tanh) 계층

설명

쌍곡탄젠트(tanh) 활성화 계층은 계층 입력값에 tanh 함수를 적용합니다.

생성

설명

layer = tanhLayer는 쌍곡탄젠트 계층을 만듭니다.

예제

layer = tanhLayer('Name',Name)은 선택적 속성인 Name을 추가로 지정합니다. 예를 들어, tanhLayer('Name','tanh1')은 이름이 'tanh1'인 tanh 계층을 만듭니다.

속성

모두 확장

계층 이름으로, 문자형 벡터 또는 string형 스칼라로 지정됩니다. Layer 배열 입력값에 대해 trainnetdlnetwork 함수는 이름이 ""인 계층에 자동으로 이름을 할당합니다.

TanhLayer 객체는 이 속성을 문자형 벡터로 저장합니다.

데이터형: char | string

읽기 전용 속성입니다.

계층에 대한 입력값의 개수로, 1로 반환됩니다. 이 계층은 단일 입력값만 받습니다.

데이터형: double

읽기 전용 속성입니다.

입력값 이름으로, {'in'}으로 반환됩니다. 이 계층은 단일 입력값만 받습니다.

데이터형: cell

읽기 전용 속성입니다.

계층의 출력값 개수로, 1로 반환됩니다. 이 계층은 단일 출력값만 가집니다.

데이터형: double

읽기 전용 속성입니다.

출력값 이름으로, {'out'}으로 반환됩니다. 이 계층은 단일 출력값만 가집니다.

데이터형: cell

예제

모두 축소

이름이 'tanh1'인 쌍곡탄젠트(tanh) 계층을 만듭니다.

layer = tanhLayer('Name','tanh1')
layer = 
  TanhLayer with properties:

    Name: 'tanh1'

   Learnable Parameters
    No properties.

   State Parameters
    No properties.

Use properties method to see a list of all properties.

Layer 배열에 tanh 계층을 포함시킵니다.

layers = [
    imageInputLayer([28 28 1])
    convolution2dLayer(3,16)
    batchNormalizationLayer
    tanhLayer
    
    maxPooling2dLayer(2,'Stride',2)
    convolution2dLayer(3,32)
    batchNormalizationLayer
    tanhLayer
    
    fullyConnectedLayer(10)
    softmaxLayer]
layers = 
  10x1 Layer array with layers:

     1   ''   Image Input           28x28x1 images with 'zerocenter' normalization
     2   ''   2-D Convolution       16 3x3 convolutions with stride [1  1] and padding [0  0  0  0]
     3   ''   Batch Normalization   Batch normalization
     4   ''   Tanh                  Hyperbolic tangent
     5   ''   2-D Max Pooling       2x2 max pooling with stride [2  2] and padding [0  0  0  0]
     6   ''   2-D Convolution       32 3x3 convolutions with stride [1  1] and padding [0  0  0  0]
     7   ''   Batch Normalization   Batch normalization
     8   ''   Tanh                  Hyperbolic tangent
     9   ''   Fully Connected       10 fully connected layer
    10   ''   Softmax               softmax

알고리즘

모두 확장

확장 기능

C/C++ 코드 생성
MATLAB® Coder™를 사용하여 C 코드나 C++ 코드를 생성할 수 있습니다.

GPU 코드 생성
GPU Coder™를 사용하여 NVIDIA® GPU용 CUDA® 코드를 생성할 수 있습니다.

버전 내역

R2019a에 개발됨

모두 확장