活性化関数Sigmoid更新日:2026-11-24概要ニューラルネットワークに非線形を導入するために、Tanh関数とともに初期の頃から利用されている活性化関数です。 生物のニューロン発火が、人工ニューロンでのシグモイド関数とTanh関数の使用の動機となりました。 当時は中間層で利用されていましたが、勾配消失問題と計算の煩雑性により、現在は分類問題などの出力層でのみ利用されることが多いです。 σ(x)=11+e−x\sigma(x) = \frac{1}{1 + e^{-x}}σ(x)=1+e−x1 出力は、 0<σ(x)<10 < \sigma(x) < 10<σ(x)<1 です。PyTorch の実装例▶コードを開くpythonコピー# PyTorch import torch.nn as nn class NN(nn.Module): def __init__(self): super().__init__() self.sigmoid = nn.Sigmoid() def forward(self, x): x = self.sigmoid(x) return x参考文献I. Goodfellow, Y. Bengio, and A. Courville, "Deep Learning," MIT Press, 2016, Section 6.3.2.PyTorch Documentation, "torch.nn.Sigmoid."S. R. Dubey, S. K. Singh, and B. B. Chaudhuri, "Activation Functions in Deep Learning: A Comprehensive Survey and Benchmark," Neurocomputing, 503, 92–108, 2022.← 一覧に戻る