nn_log_sigmoid function

LogSigmoid module

LogSigmoid module

Applies the element-wise function: [REMOVE_ME]\mboxLogSigmoid(x)=log(11+exp(x))[REMOVEME2] \mbox{LogSigmoid}(x) = \log\left(\frac{ 1 }{ 1 + \exp(-x)}\right) [REMOVE_ME_2]

nn_log_sigmoid()

Description

Applies the element-wise function:

\mboxLogSigmoid(x)=log(11+exp(x)) \mbox{LogSigmoid}(x) = \log\left(\frac{ 1 }{ 1 + \exp(-x)}\right)

Shape

  • Input: (N,)(N, *) where * means, any number of additional dimensions
  • Output: (N,)(N, *), same shape as the input

Examples

if (torch_is_installed()) { m <- nn_log_sigmoid() input <- torch_randn(2) output <- m(input) }
  • Maintainer: Daniel Falbel
  • License: MIT + file LICENSE
  • Last published: 2025-02-14