주요 콘텐츠

이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.

tanhLayer

R2026a

쌍곡탄젠트(tanh) 계층

설명

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

생성

설명

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

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

예제

속성

모두 확장

계층 이름으로, 문자형 벡터로 지정됩니다. Layer 배열 입력값에 대해 trainnet 및 dlnetwork 함수는 이름이 지정되지 않은 계층에 자동으로 이름을 할당합니다.

데이터형: char

읽기 전용 속성입니다.

계층에 대한 입력값의 개수로, 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.

  Show 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 = 
  10×1 Layer array with layers:

     1   ''   Image Input           28×28×1 images with 'zerocenter' normalization
     2   ''   2-D Convolution       16 3×3 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       2×2 max pooling with stride [2  2] and padding [0  0  0  0]
     6   ''   2-D Convolution       32 3×3 convolutions with stride [1  1] and padding [0  0  0  0]
     7   ''   Batch Normalization   Batch normalization
     8   ''   Tanh                  Hyperbolic tangent
     9   ''   Fully Connected       Fully connected layer with output size 10
    10   ''   Softmax               Softmax

알고리즘

모두 확장

확장 기능

모두 확장

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

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

버전 내역

R2019a에 개발됨

모두 확장