From c4e480efc51dff89f76d5c4b4e97a9c9458cb9ae Mon Sep 17 00:00:00 2001 From: Yang Zhang Date: Fri, 14 Aug 2020 19:33:37 +0800 Subject: [PATCH] Fix `paddle.cos` docstring (#25969) test=develop,test=document_fix explain input/out put range and out of boundary behavior --- paddle/fluid/operators/activation_op.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/paddle/fluid/operators/activation_op.cc b/paddle/fluid/operators/activation_op.cc index 107d333d3a8..7dedb36d6e1 100644 --- a/paddle/fluid/operators/activation_op.cc +++ b/paddle/fluid/operators/activation_op.cc @@ -242,6 +242,9 @@ $$out = \\left \\lfloor x \\right \\rfloor$$ UNUSED constexpr char CosDoc[] = R"DOC( Cosine Operator. Computes cosine of x element-wise. +Input range is `(-inf, inf)` and output range is `[-1,1]`. +Return `nan` if input is out of boundary. + $$out = cos(x)$$ )DOC"; -- GitLab