Skip to content

Commit

Permalink
Fix sign in description of log_sigmoid (#1563)
Browse files Browse the repository at this point in the history
Documentations appears wrong; this fixes the sign in the description of `log_sigmoid`
  • Loading branch information
bskaggs authored and neubig committed Jun 6, 2019
1 parent 1fafb23 commit 1ae19fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/_dynet.pyx
Expand Up @@ -3493,14 +3493,14 @@ cpdef Expression log(Expression x):
cpdef Expression log_sigmoid(Expression x):
"""Log sigmoid
Calculate elementwise log sigmoid function :math:`y_i = \ln(\\frac{1}{1+e^{x_i}})`
Calculate elementwise log sigmoid function :math:`y_i = \ln(\\frac{1}{1+e^{-x_i}})`
This is more numerically stable than `log(logistic(x))`
Args:
x (dynet.Expression): Input expression
Returns:
dynet.Expression: :math:`y_i = \ln(\\frac{1}{1+e^{x_i}})`
dynet.Expression: :math:`y_i = \ln(\\frac{1}{1+e^{-x_i}})`
"""
return Expression.from_cexpr(x.cg_version, c_log_sigmoid(x.c()))
cpdef Expression lgamma(Expression x):
Expand Down

0 comments on commit 1ae19fd

Please sign in to comment.