تدفق التوتر:: العمليات:: كوس
#include <math_ops.h>
يحسب جتا x من حيث العناصر.
ملخص
بالنظر إلى موتر الإدخال، تحسب هذه الدالة جيب تمام كل عنصر في الموتر. نطاق الإدخال هو (-inf, inf)
ونطاق الإخراج هو [-1,1]
. إذا كان الإدخال يقع خارج الحدود، فسيتم إرجاع nan
.
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]
الحجج:
- النطاق: كائن النطاق
العوائد:
-
Output
: الموتر y.
البنائين والمدمرين | |
---|---|
Cos (const :: tensorflow::Scope & scope, :: tensorflow::Input x) |
الصفات العامة | |
---|---|
operation | |
y |
الوظائف العامة | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
الصفات العامة
عملية
Operation operation
ذ
::tensorflow::Output y
الوظائف العامة
كوس
Cos( const ::tensorflow::Scope & scope, ::tensorflow::Input x )
العقدة
::tensorflow::Node * node() const
المشغل::tensorflow::الإدخال
operator::tensorflow::Input() const
المشغل::tensorflow::الإخراج
operator::tensorflow::Output() const
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# tensorflow::ops::Cos Class Reference\n\ntensorflow::ops::Cos\n====================\n\n`#include \u003cmath_ops.h\u003e`\n\nComputes cos of x element-wise.\n\nSummary\n-------\n\nGiven an input tensor, this function computes cosine of every element in the tensor. [Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input) range is `(-inf, inf)` and output range is `[-1,1]`. If input lies outside the boundary, `nan` is returned.\n\n\n```gdscript\n x = tf.constant([-float(\"inf\"), -9, -0.5, 1, 1.2, 200, 10000, float(\"inf\")])\n tf.math.cos(x) ==\u003e [nan -0.91113025 0.87758255 0.5403023 0.36235774 0.48718765 -0.95215535 nan]\n \n```\n\n\u003cbr /\u003e\n\nArguments:\n\n- scope: A [Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The y tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [Cos](#classtensorflow_1_1ops_1_1_cos_1a4ce1eaf028ad3e711a91dcd15b0c507f)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` x)` ||\n\n| ### Public attributes ||\n|---------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_cos_1a4ffd18df457c2a2c8275cf2425e489e9) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [y](#classtensorflow_1_1ops_1_1_cos_1af2e653ddc7ca687b13e27ec5529f316a) | `::`[tensorflow::Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|---------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_cos_1a134873100b8bd65d802cfbfad2ad260c)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_cos_1a198fd4284911414e52ceb9b8f884ea58)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_cos_1a2a0d44fe189b87af6d3f178798ee084a)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### y\n\n```text\n::tensorflow::Output y\n``` \n\nPublic functions\n----------------\n\n### Cos\n\n```gdscript\n Cos(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input x\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n```"]]