From 09b554574a3f39f5596d9811ff6cc9c39387177c Mon Sep 17 00:00:00 2001 From: saishruthi Date: Sat, 25 May 2019 00:35:25 -0700 Subject: [PATCH 1/8] Adding doc for 2.0 --- tensorflow/core/api_def/base_api/api_def_Cos.pbtxt | 9 +++++++++ tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt | 10 ++++++++++ tensorflow/core/api_def/base_api/api_def_Sin.pbtxt | 11 ++++++++++- tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt | 10 ++++++++++ tensorflow/core/api_def/base_api/api_def_Tan.pbtxt | 9 +++++++++ tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt | 9 +++++++++ 6 files changed, 57 insertions(+), 1 deletion(-) diff --git a/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt b/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt index 43fb75836f2..2c7aa7c8f70 100644 --- a/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt @@ -1,4 +1,13 @@ op { graph_op_name: "Cos" summary: "Computes cos of x element-wise." + description: << END + Given an input tensor, this function computes cosine of every + element in the tensor. Input range is (-infinity, infinity) and + output range is [-1,1]. + ```python + x = tf.constant([-9, -0.5, 1, 1.2, 200, 10000]) + tf.cos(x) ==> [-0.91113025 0.87758255 0.5403023 0.3623577 0.48718768 -0.95215535] + ``` +END } diff --git a/tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt b/tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt index aaeb4ccbd50..e2e18d9a38e 100644 --- a/tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt @@ -1,4 +1,14 @@ op { graph_op_name: "Cosh" summary: "Computes hyperbolic cosine of x element-wise." + description: << END + Given an input tensor, this function computes hyperbolic cosine of every + element in the tensor. Input range is (-infinity, infinity) and output range + is [1, infinity). + ```python + x = tf.constant([-9, -0.5, 1, 1.2, 2, 10]) + tf.cosh(x, name ='cosh') ==> [4.0515420e+03 1.1276259e+00 1.5430807e+00 1.8106556e+00 3.7621956e+00 + 1.1013233e+04] + ``` +END } diff --git a/tensorflow/core/api_def/base_api/api_def_Sin.pbtxt b/tensorflow/core/api_def/base_api/api_def_Sin.pbtxt index f4edefb66d4..875de66c33a 100644 --- a/tensorflow/core/api_def/base_api/api_def_Sin.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Sin.pbtxt @@ -1,4 +1,13 @@ op { graph_op_name: "Sin" - summary: "Computes sin of x element-wise." + summary: "Computes sine of x element-wise." + description: << END + Given an input tensor, this function computes sine of every + element in the tensor. Input range is (-infinity, infinity) and + output range is [-1,1]. + ```python + x = tf.constant([-9, -0.5, 1, 1.2, 200, 10000]) + tf.sin(x, name ='sin') ==> [-0.4121185 -0.47942555 0.84147096 0.9320391 -0.8732973 -0.5440211] + ``` +END } diff --git a/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt b/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt index a6784e8a59e..22774b387fd 100644 --- a/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt @@ -1,4 +1,14 @@ op { graph_op_name: "Sinh" summary: "Computes hyperbolic sine of x element-wise." + description: << END + Given an input tensor, this function computes hyperbolic sine of every + element in the tensor. Input range is (-infinity, infinity) and output range + is (-infinity, infinity). + ```python + x = tf.constant([-9, -0.5, 1, 1.2, 2, 10]) + tf.sinh(x, name ='sinh') ==> [-4.0515420e+03 -5.2109528e-01 1.1752012e+00 1.5094614e+00 + 3.6268604e+00 1.1013232e+04] + ``` +END } diff --git a/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt b/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt index 20f3e4eab3d..f429e196aff 100644 --- a/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt @@ -1,4 +1,13 @@ op { graph_op_name: "Tan" summary: "Computes tan of x element-wise." + description: << END + Given an input tensor, this function computes tangent of every + element in the tensor. Input range is (-infinity, infinity) and + output range is (-infinity, infinity). + ```python + x = tf.constant([-9, -0.5, 1, 1.2, 200, 10000]) + tf.tan(x, name ='tan') ==> [ 0.45231566 -0.5463025 1.5574077 2.572152 -1.7925274 0.32097113] + ``` +EOD } diff --git a/tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt b/tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt index 3658ee641a7..1e1503aa763 100644 --- a/tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt @@ -1,4 +1,13 @@ op { graph_op_name: "Tanh" summary: "Computes hyperbolic tangent of `x` element-wise." + description: << END + Given an input tensor, this function computes hyperbolic tangent of every + element in the tensor. Input range is (-infinity, infinity) and + output range is (-1,1). + ```python + x = tf.constant([-5, -0.5, 1, 1.2, 2, 3]) + [-0.99990916 -0.46211717 0.7615942 0.8336547 0.9640276 0.9950547 ] + ``` +END } From 8f17b9087d958f5d71729f4836b2521bc5bf5473 Mon Sep 17 00:00:00 2001 From: saishruthi Date: Sat, 25 May 2019 01:55:47 -0700 Subject: [PATCH 2/8] Adding doc for 2.0 --- tensorflow/core/api_def/base_api/api_def_Cos.pbtxt | 2 +- tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt | 2 +- tensorflow/core/api_def/base_api/api_def_Sin.pbtxt | 2 +- tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt | 2 +- tensorflow/core/api_def/base_api/api_def_Tan.pbtxt | 2 +- tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt b/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt index 2c7aa7c8f70..696fe149552 100644 --- a/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt @@ -7,7 +7,7 @@ op { output range is [-1,1]. ```python x = tf.constant([-9, -0.5, 1, 1.2, 200, 10000]) - tf.cos(x) ==> [-0.91113025 0.87758255 0.5403023 0.3623577 0.48718768 -0.95215535] + tf.math.cos(x) ==> [-0.91113025 0.87758255 0.5403023 0.3623577 0.48718768 -0.95215535] ``` END } diff --git a/tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt b/tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt index e2e18d9a38e..4b92b8f1875 100644 --- a/tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt @@ -7,7 +7,7 @@ op { is [1, infinity). ```python x = tf.constant([-9, -0.5, 1, 1.2, 2, 10]) - tf.cosh(x, name ='cosh') ==> [4.0515420e+03 1.1276259e+00 1.5430807e+00 1.8106556e+00 3.7621956e+00 + tf.math.cosh(x, name ='cosh') ==> [4.0515420e+03 1.1276259e+00 1.5430807e+00 1.8106556e+00 3.7621956e+00 1.1013233e+04] ``` END diff --git a/tensorflow/core/api_def/base_api/api_def_Sin.pbtxt b/tensorflow/core/api_def/base_api/api_def_Sin.pbtxt index 875de66c33a..9e51bb8c70b 100644 --- a/tensorflow/core/api_def/base_api/api_def_Sin.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Sin.pbtxt @@ -7,7 +7,7 @@ op { output range is [-1,1]. ```python x = tf.constant([-9, -0.5, 1, 1.2, 200, 10000]) - tf.sin(x, name ='sin') ==> [-0.4121185 -0.47942555 0.84147096 0.9320391 -0.8732973 -0.5440211] + tf.math.sin(x, name ='sin') ==> [-0.4121185 -0.47942555 0.84147096 0.9320391 -0.8732973 -0.5440211] ``` END } diff --git a/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt b/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt index 22774b387fd..65a5e41cbda 100644 --- a/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt @@ -7,7 +7,7 @@ op { is (-infinity, infinity). ```python x = tf.constant([-9, -0.5, 1, 1.2, 2, 10]) - tf.sinh(x, name ='sinh') ==> [-4.0515420e+03 -5.2109528e-01 1.1752012e+00 1.5094614e+00 + tf.math.sinh(x, name ='sinh') ==> [-4.0515420e+03 -5.2109528e-01 1.1752012e+00 1.5094614e+00 3.6268604e+00 1.1013232e+04] ``` END diff --git a/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt b/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt index f429e196aff..b9daa285557 100644 --- a/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt @@ -7,7 +7,7 @@ op { output range is (-infinity, infinity). ```python x = tf.constant([-9, -0.5, 1, 1.2, 200, 10000]) - tf.tan(x, name ='tan') ==> [ 0.45231566 -0.5463025 1.5574077 2.572152 -1.7925274 0.32097113] + tf.math.tan(x, name ='tan') ==> [ 0.45231566 -0.5463025 1.5574077 2.572152 -1.7925274 0.32097113] ``` EOD } diff --git a/tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt b/tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt index 1e1503aa763..de4d8c9feef 100644 --- a/tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt @@ -6,8 +6,8 @@ op { element in the tensor. Input range is (-infinity, infinity) and output range is (-1,1). ```python - x = tf.constant([-5, -0.5, 1, 1.2, 2, 3]) - [-0.99990916 -0.46211717 0.7615942 0.8336547 0.9640276 0.9950547 ] + x = tf.math.constant([-5, -0.5, 1, 1.2, 2, 3]) + [-0.99990916 -0.46211717 0.7615942 0.8336547 0.9640276 0.9950547] ``` END } From 9d34280e127d26454d3b97adb3edfbf5da3e8b44 Mon Sep 17 00:00:00 2001 From: saishruthi Date: Sat, 25 May 2019 01:56:59 -0700 Subject: [PATCH 3/8] Adding doc for 2.0 --- tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt b/tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt index de4d8c9feef..23eeee5e7bd 100644 --- a/tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt @@ -7,7 +7,7 @@ op { output range is (-1,1). ```python x = tf.math.constant([-5, -0.5, 1, 1.2, 2, 3]) - [-0.99990916 -0.46211717 0.7615942 0.8336547 0.9640276 0.9950547] + tf.math.tanh(x, name ='tanh') ==> [-0.99990916 -0.46211717 0.7615942 0.8336547 0.9640276 0.9950547] ``` END } From 487ba68b2d438b75e53ecd8424c5bd73272011ee Mon Sep 17 00:00:00 2001 From: saishruthi Date: Sat, 25 May 2019 01:58:39 -0700 Subject: [PATCH 4/8] Adding doc for 2.0 --- tensorflow/core/api_def/base_api/api_def_Cos.pbtxt | 2 +- tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt | 2 +- tensorflow/core/api_def/base_api/api_def_Sin.pbtxt | 2 +- tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt | 2 +- tensorflow/core/api_def/base_api/api_def_Tan.pbtxt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt b/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt index 696fe149552..7faa9922709 100644 --- a/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt @@ -7,7 +7,7 @@ op { output range is [-1,1]. ```python x = tf.constant([-9, -0.5, 1, 1.2, 200, 10000]) - tf.math.cos(x) ==> [-0.91113025 0.87758255 0.5403023 0.3623577 0.48718768 -0.95215535] + tf.math.cos(x, name ='cos') ==> [-0.91113025 0.87758255 0.5403023 0.3623577 0.48718768 -0.95215535] ``` END } diff --git a/tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt b/tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt index 4b92b8f1875..5538885490a 100644 --- a/tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt @@ -8,7 +8,7 @@ op { ```python x = tf.constant([-9, -0.5, 1, 1.2, 2, 10]) tf.math.cosh(x, name ='cosh') ==> [4.0515420e+03 1.1276259e+00 1.5430807e+00 1.8106556e+00 3.7621956e+00 - 1.1013233e+04] + 1.1013233e+04] ``` END } diff --git a/tensorflow/core/api_def/base_api/api_def_Sin.pbtxt b/tensorflow/core/api_def/base_api/api_def_Sin.pbtxt index 9e51bb8c70b..c926fcbbe67 100644 --- a/tensorflow/core/api_def/base_api/api_def_Sin.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Sin.pbtxt @@ -7,7 +7,7 @@ op { output range is [-1,1]. ```python x = tf.constant([-9, -0.5, 1, 1.2, 200, 10000]) - tf.math.sin(x, name ='sin') ==> [-0.4121185 -0.47942555 0.84147096 0.9320391 -0.8732973 -0.5440211] + tf.math.sin(x, name ='sin') ==> [-0.4121185 -0.47942555 0.84147096 0.9320391 -0.8732973 -0.5440211] ``` END } diff --git a/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt b/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt index 65a5e41cbda..2c11455da65 100644 --- a/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt @@ -8,7 +8,7 @@ op { ```python x = tf.constant([-9, -0.5, 1, 1.2, 2, 10]) tf.math.sinh(x, name ='sinh') ==> [-4.0515420e+03 -5.2109528e-01 1.1752012e+00 1.5094614e+00 - 3.6268604e+00 1.1013232e+04] + 3.6268604e+00 1.1013232e+04] ``` END } diff --git a/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt b/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt index b9daa285557..00a77911036 100644 --- a/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt @@ -9,5 +9,5 @@ op { x = tf.constant([-9, -0.5, 1, 1.2, 200, 10000]) tf.math.tan(x, name ='tan') ==> [ 0.45231566 -0.5463025 1.5574077 2.572152 -1.7925274 0.32097113] ``` -EOD +END } From b6f66bf80390f7df9f5204da8b9fa92de11396a9 Mon Sep 17 00:00:00 2001 From: saishruthi Date: Fri, 31 May 2019 17:51:54 -0700 Subject: [PATCH 5/8] changes based on comments --- tensorflow/core/api_def/base_api/api_def_Cos.pbtxt | 9 +++++---- tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt | 10 +++++----- tensorflow/core/api_def/base_api/api_def_Sin.pbtxt | 9 +++++---- tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt | 10 +++++----- tensorflow/core/api_def/base_api/api_def_Tan.pbtxt | 9 +++++---- tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt | 9 +++++---- 6 files changed, 30 insertions(+), 26 deletions(-) diff --git a/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt b/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt index 7faa9922709..19903c53703 100644 --- a/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt @@ -3,11 +3,12 @@ op { summary: "Computes cos of x element-wise." description: << END Given an input tensor, this function computes cosine of every - element in the tensor. Input range is (-infinity, infinity) and - output range is [-1,1]. + element in the tensor. Input range is `(-inf, inf)` and + output range is `[-1,1]`. + ```python - x = tf.constant([-9, -0.5, 1, 1.2, 200, 10000]) - tf.math.cos(x, name ='cos') ==> [-0.91113025 0.87758255 0.5403023 0.3623577 0.48718768 -0.95215535] + x = tf.constant([-float("inf"), -9, -0.5, 1, 1.2, 200, 10000, float("inf")]) + tf.math.cos(x) ==> [nan -0.91113025 0.87758255 0.5403023 0.36235774 0.48718765 -0.95215535 nan] ``` END } diff --git a/tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt b/tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt index 5538885490a..2c695cde6b1 100644 --- a/tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt @@ -3,12 +3,12 @@ op { summary: "Computes hyperbolic cosine of x element-wise." description: << END Given an input tensor, this function computes hyperbolic cosine of every - element in the tensor. Input range is (-infinity, infinity) and output range - is [1, infinity). + element in the tensor. Input range is `[-inf, inf]` and output range + is `[1, inf]`. + ```python - x = tf.constant([-9, -0.5, 1, 1.2, 2, 10]) - tf.math.cosh(x, name ='cosh') ==> [4.0515420e+03 1.1276259e+00 1.5430807e+00 1.8106556e+00 3.7621956e+00 - 1.1013233e+04] + x = tf.constant([-float("inf"), -9, -0.5, 1, 1.2, 2, 10, float("inf")]) + tf.math.cosh(x) ==> [inf 4.0515420e+03 1.1276259e+00 1.5430807e+00 1.8106556e+00 3.7621956e+00 1.1013233e+04 inf] ``` END } diff --git a/tensorflow/core/api_def/base_api/api_def_Sin.pbtxt b/tensorflow/core/api_def/base_api/api_def_Sin.pbtxt index c926fcbbe67..5cc1d7c9be4 100644 --- a/tensorflow/core/api_def/base_api/api_def_Sin.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Sin.pbtxt @@ -3,11 +3,12 @@ op { summary: "Computes sine of x element-wise." description: << END Given an input tensor, this function computes sine of every - element in the tensor. Input range is (-infinity, infinity) and - output range is [-1,1]. + element in the tensor. Input range is `(-inf, inf)` and + output range is `[-1,1]`. + ```python - x = tf.constant([-9, -0.5, 1, 1.2, 200, 10000]) - tf.math.sin(x, name ='sin') ==> [-0.4121185 -0.47942555 0.84147096 0.9320391 -0.8732973 -0.5440211] + x = tf.constant([-float("inf"), -9, -0.5, 1, 1.2, 200, 10, float("inf")]) + tf.math.sin(x) ==> [nan -0.4121185 -0.47942555 0.84147096 0.9320391 -0.87329733 -0.54402107 nan] ``` END } diff --git a/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt b/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt index 2c11455da65..573953ce01e 100644 --- a/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt @@ -3,12 +3,12 @@ op { summary: "Computes hyperbolic sine of x element-wise." description: << END Given an input tensor, this function computes hyperbolic sine of every - element in the tensor. Input range is (-infinity, infinity) and output range - is (-infinity, infinity). + element in the tensor. Input range is `[-inf, inf]` and output range + is `[-inf, inf]`. + ```python - x = tf.constant([-9, -0.5, 1, 1.2, 2, 10]) - tf.math.sinh(x, name ='sinh') ==> [-4.0515420e+03 -5.2109528e-01 1.1752012e+00 1.5094614e+00 - 3.6268604e+00 1.1013232e+04] + x = tf.constant([-float("inf"), -9, -0.5, 1, 1.2, 2, 10, float("inf")]) + tf.math.sinh(x) ==> [-inf -4.0515420e+03 -5.2109528e-01 1.1752012e+00 1.5094614e+00 3.6268604e+00 1.1013232e+04 inf] ``` END } diff --git a/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt b/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt index 00a77911036..723ad462adb 100644 --- a/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt @@ -3,11 +3,12 @@ op { summary: "Computes tan of x element-wise." description: << END Given an input tensor, this function computes tangent of every - element in the tensor. Input range is (-infinity, infinity) and - output range is (-infinity, infinity). + element in the tensor. Input range is `(-inf, inf)` and + output range is `(-inf, inf)`. + ```python - x = tf.constant([-9, -0.5, 1, 1.2, 200, 10000]) - tf.math.tan(x, name ='tan') ==> [ 0.45231566 -0.5463025 1.5574077 2.572152 -1.7925274 0.32097113] + x = tf.constant([-float("inf"), -9, -0.5, 1, 1.2, 200, 10000, float("inf")]) + tf.math.tan(x) ==> [nan 0.45231566 -0.5463025 1.5574077 2.572152 -1.7925274 0.32097113 nan] ``` END } diff --git a/tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt b/tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt index 23eeee5e7bd..e33fbff6c3e 100644 --- a/tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt @@ -3,11 +3,12 @@ op { summary: "Computes hyperbolic tangent of `x` element-wise." description: << END Given an input tensor, this function computes hyperbolic tangent of every - element in the tensor. Input range is (-infinity, infinity) and - output range is (-1,1). + element in the tensor. Input range is `[-inf, inf]` and + output range is `[-1,1]`. + ```python - x = tf.math.constant([-5, -0.5, 1, 1.2, 2, 3]) - tf.math.tanh(x, name ='tanh') ==> [-0.99990916 -0.46211717 0.7615942 0.8336547 0.9640276 0.9950547] + x = tf.constant([-float("inf"), -5, -0.5, 1, 1.2, 2, 3, float("inf")]) + tf.math.tanh(x) ==> [-1. -0.99990916 -0.46211717 0.7615942 0.8336547 0.9640276 0.9950547 1.] ``` END } From 31b70ecb49acd126a0eeb08f78d0ee114d5d3220 Mon Sep 17 00:00:00 2001 From: saishruthi Date: Fri, 31 May 2019 20:13:56 -0700 Subject: [PATCH 6/8] changes based on comments --- tensorflow/core/api_def/base_api/api_def_Cos.pbtxt | 3 ++- tensorflow/core/api_def/base_api/api_def_Tan.pbtxt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt b/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt index 19903c53703..383d8681b6e 100644 --- a/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt @@ -4,7 +4,8 @@ op { description: << END Given an input tensor, this function computes cosine of every element in the tensor. Input range is `(-inf, inf)` and - output range is `[-1,1]`. + output range is `[-1,1]`. If input lies outside the boundary, `nan` + is returned. ```python x = tf.constant([-float("inf"), -9, -0.5, 1, 1.2, 200, 10000, float("inf")]) diff --git a/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt b/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt index 723ad462adb..8a972ba3d86 100644 --- a/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Tan.pbtxt @@ -4,7 +4,8 @@ op { description: << END Given an input tensor, this function computes tangent of every element in the tensor. Input range is `(-inf, inf)` and - output range is `(-inf, inf)`. + output range is `(-inf, inf)`. If input lies outside the boundary, `nan` + is returned. ```python x = tf.constant([-float("inf"), -9, -0.5, 1, 1.2, 200, 10000, float("inf")]) From 6715c7e6253ff21ae8b5938430492f4c90e8d782 Mon Sep 17 00:00:00 2001 From: saishruthi Date: Fri, 7 Jun 2019 19:20:07 -0700 Subject: [PATCH 7/8] Updates to addn --- tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt b/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt index 573953ce01e..70e0f1bedd6 100644 --- a/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt @@ -3,8 +3,8 @@ op { summary: "Computes hyperbolic sine of x element-wise." description: << END Given an input tensor, this function computes hyperbolic sine of every - element in the tensor. Input range is `[-inf, inf]` and output range - is `[-inf, inf]`. + element in the tensor. Input range is `[-inf,inf]` and output range + is `[-inf,inf]`. ```python x = tf.constant([-float("inf"), -9, -0.5, 1, 1.2, 2, 10, float("inf")]) @@ -12,3 +12,4 @@ op { ``` END } + From 7fc71251d984c0d5469b6dd52818242c71edd214 Mon Sep 17 00:00:00 2001 From: saishruthi Date: Mon, 17 Jun 2019 13:54:05 -0700 Subject: [PATCH 8/8] issue update --- tensorflow/core/api_def/base_api/api_def_Cos.pbtxt | 2 +- tensorflow/core/api_def/base_api/api_def_Cosh.pbtxt | 2 +- tensorflow/core/api_def/base_api/api_def_Sin.pbtxt | 2 +- tensorflow/core/api_def/base_api/api_def_Sinh.pbtxt | 2 +- tensorflow/core/api_def/base_api/api_def_Tan.pbtxt | 2 +- tensorflow/core/api_def/base_api/api_def_Tanh.pbtxt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt b/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt index 383d8681b6e..1aeb89c9a60 100644 --- a/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt +++ b/tensorflow/core/api_def/base_api/api_def_Cos.pbtxt @@ -1,7 +1,7 @@ op { graph_op_name: "Cos" summary: "Computes cos of x element-wise." - description: << END + description: <