จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เทนเซอร์โฟลว์:: ปฏิบัติการ:: ประสบการณ์
#include <math_ops.h>
คำนวณเลขยกกำลังขององค์ประกอบ x ตามลำดับ
สรุป
\(y = e^x\)-
ฟังก์ชันนี้จะคำนวณเลขชี้กำลังของทุกองค์ประกอบในเทนเซอร์อินพุต เช่น exp(x)
หรือ e^(x)
โดยที่ x
คือเทนเซอร์อินพุต e
หมายถึงเลขของออยเลอร์ และมีค่าประมาณเท่ากับ 2.718281 เอาต์พุต เป็นบวกสำหรับอินพุตจริงใดๆ
x = tf.constant(2.0)
tf.math.exp(x) ==> 7.389056
x = tf.constant([2.0, 8.0])
tf.math.exp(x) ==> array([7.389056, 2980.958], dtype=float32)
สำหรับจำนวนเชิงซ้อน ค่าเลขชี้กำลังจะถูกคำนวณดังนี้:
e^(x+iy) = e^x * e^iy = e^x * (cos y + i sin y)
ลองพิจารณาจำนวนเชิงซ้อน 1+1j เป็นตัวอย่าง e^1 * (cos 1 + i sin 1) = 2.7182818284590 * (0.54030230586+0.8414709848j)
x = tf.constant(1 + 1j)
tf.math.exp(x) ==> 1.4686939399158851+2.2873552871788423j
ข้อโต้แย้ง:
ผลตอบแทน:
คุณลักษณะสาธารณะ
งานสาธารณะ
โหนด
::tensorflow::Node * node() const
operator::tensorflow::Input() const
ตัวดำเนินการ::tensorflow::เอาต์พุต
operator::tensorflow::Output() const
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[],[],null,["# tensorflow::ops::Exp Class Reference\n\ntensorflow::ops::Exp\n====================\n\n`#include \u003cmath_ops.h\u003e`\n\nComputes exponential of x element-wise.\n\nSummary\n-------\n\n\\\\(y = e\\^x\\\\).\n\nThis function computes the exponential of every element in the input tensor. i.e. `exp(x)` or `e^(x)`, where `x` is the input tensor. `e` denotes Euler's number and is approximately equal to 2.718281. [Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) is positive for any real input.\n\n\n```gdscript\n x = tf.constant(2.0)\n tf.math.exp(x) ==\u003e 7.389056\n```\n\n\u003cbr /\u003e\n\n\n```gdscript\n x = tf.constant([2.0, 8.0])\n tf.math.exp(x) ==\u003e array([7.389056, 2980.958], dtype=float32)\n \n```\n\n\u003cbr /\u003e\n\nFor complex numbers, the exponential value is calculated as follows:\n\n\n```scdoc\n e^(x+iy) = e^x * e^iy = e^x * (cos y + i sin y)\n \n```\n\n\u003cbr /\u003e\n\nLet's consider complex number 1+1j as an example. e\\^1 \\* (cos 1 + i sin 1) = 2.7182818284590 \\* (0.54030230586+0.8414709848j)\n\n\n```gdscript\n x = tf.constant(1 + 1j)\n tf.math.exp(x) ==\u003e 1.4686939399158851+2.2873552871788423j\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| [Exp](#classtensorflow_1_1ops_1_1_exp_1aa5419f33d177e95f326a2dfcad2953eb)`(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_exp_1ac936e897598d160c335f673bf833bdeb) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [y](#classtensorflow_1_1ops_1_1_exp_1acec4d597d17df94ecccfd9d29eddf575) | `::`[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_exp_1af53d5710bdc80316d5e9ea12031337af)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_exp_1ae1bad90173cb03f4c2509197101438e1)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_exp_1a34c367c172a44e41239ff083a588dd85)`() 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### Exp\n\n```gdscript\n Exp(\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```"]]