จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เทนเซอร์โฟลว์:: ปฏิบัติการ:: FusedBatchNormV2
#include <nn_ops.h>
การทำให้เป็นมาตรฐานแบบแบตช์
สรุป
โปรดทราบว่าขนาดของเทนเซอร์ 4D ถูกกำหนดโดย "NHWC" หรือ "NCHW" ขนาดของเทนเซอร์ 1D ตรงกับมิติ C ของเทนเซอร์ 4D
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
- x: 4D Tensor สำหรับข้อมูลอินพุต
- สเกล: เทนเซอร์ 1D สำหรับตัวประกอบสเกล เพื่อปรับขนาด x ปกติ
- ออฟเซ็ต: 1D Tensor สำหรับออฟเซ็ต เพื่อเลื่อนไปที่ x ปกติ
- ค่าเฉลี่ย: 1D Tensor สำหรับค่าเฉลี่ยประชากร ใช้สำหรับการอนุมานเท่านั้น จะต้องว่างเปล่าสำหรับการฝึกอบรม
- ความแปรปรวน: 1D Tensor สำหรับความแปรปรวนของประชากร ใช้สำหรับการอนุมานเท่านั้น จะต้องว่างเปล่าสำหรับการฝึกอบรม
แอ็ตทริบิวต์ทางเลือก (ดู Attrs
):
- เอปไซลอน: จำนวนทศนิยมขนาดเล็กที่บวกเข้ากับความแปรปรวนของ x
- data_format: รูปแบบข้อมูลสำหรับ x และ y "NHWC" (ค่าเริ่มต้น) หรือ "NCHW"
- is_training: ค่าบูลเพื่อระบุการดำเนินการสำหรับการฝึก (ค่าเริ่มต้น) หรือการอนุมาน
ผลตอบแทน:
-
Output
y: เทนเซอร์ 4D สำหรับข้อมูลเอาต์พุต -
Output
Batch_mean: 1D Tensor สำหรับค่าเฉลี่ยแบทช์ที่คำนวณ ซึ่ง TensorFlow ใช้เพื่อคำนวณค่าเฉลี่ยที่ทำงานอยู่ -
Output
batt_variance: 1D Tensor สำหรับความแปรปรวนของแบตช์ที่คำนวณแล้ว ซึ่ง TensorFlow จะนำไปใช้ในการคำนวณความแปรปรวนที่ทำงานอยู่ -
Output
Reserve_space_1: 1D Tensor สำหรับค่าเฉลี่ยแบทช์ที่คำนวณแล้ว เพื่อนำมาใช้ซ้ำในการคำนวณแบบไล่ระดับ -
Output
Reserve_space_2: 1D Tensor สำหรับความแปรปรวนแบทช์ที่คำนวณแล้ว (ความแปรปรวนแบบกลับด้านในกรณี cuDNN) เพื่อนำมาใช้ซ้ำในการคำนวณการไล่ระดับสี
ตัวสร้างและผู้ทำลาย |
---|
FusedBatchNormV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input x, :: tensorflow::Input scale, :: tensorflow::Input offset, :: tensorflow::Input mean, :: tensorflow::Input variance)
|
FusedBatchNormV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input x, :: tensorflow::Input scale, :: tensorflow::Input offset, :: tensorflow::Input mean, :: tensorflow::Input variance, const FusedBatchNormV2::Attrs & attrs) |
คุณลักษณะสาธารณะ
งานสาธารณะ
ฟังก์ชันคงที่สาธารณะ
Attrs DataFormat(
StringPiece x
)
เอปซิลอน
Attrs Epsilon(
float x
)
คือการฝึกอบรม
Attrs IsTraining(
bool x
)
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[],[],null,["# tensorflow::ops::FusedBatchNormV2 Class Reference\n\ntensorflow::ops::FusedBatchNormV2\n=================================\n\n`#include \u003cnn_ops.h\u003e`\n\nBatch normalization.\n\nSummary\n-------\n\nNote that the size of 4D Tensors are defined by either \"NHWC\" or \"NCHW\". The size of 1D Tensors matches the dimension C of the 4D Tensors.\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- x: A 4D [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for input data.\n- scale: A 1D [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for scaling factor, to scale the normalized x.\n- offset: A 1D [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for offset, to shift to the normalized x.\n- mean: A 1D [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for population mean. Used for inference only; must be empty for training.\n- variance: A 1D [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for population variance. Used for inference only; must be empty for training.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/fused-batch-norm-v2/attrs#structtensorflow_1_1ops_1_1_fused_batch_norm_v2_1_1_attrs)):\n\n- epsilon: A small float number added to the variance of x.\n- data_format: The data format for x and y. Either \"NHWC\" (default) or \"NCHW\".\n- is_training: A bool value to indicate the operation is for training (default) or inference.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) y: A 4D [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for output data.\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) batch_mean: A 1D [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for the computed batch mean, to be used by TensorFlow to compute the running mean.\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) batch_variance: A 1D [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for the computed batch variance, to be used by TensorFlow to compute the running variance.\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) reserve_space_1: A 1D [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for the computed batch mean, to be reused in the gradient computation.\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) reserve_space_2: A 1D [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for the computed batch variance (inverted variance in the cuDNN case), to be reused in the gradient computation.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [FusedBatchNormV2](#classtensorflow_1_1ops_1_1_fused_batch_norm_v2_1a41b5d9943718ba17353eb0bea3660fb5)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` x, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` scale, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` offset, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` mean, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` variance)` ||\n| [FusedBatchNormV2](#classtensorflow_1_1ops_1_1_fused_batch_norm_v2_1a22fcefed0156ba86e64e061602ec0502)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` x, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` scale, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` offset, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` mean, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` variance, const `[FusedBatchNormV2::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/fused-batch-norm-v2/attrs#structtensorflow_1_1ops_1_1_fused_batch_norm_v2_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [batch_mean](#classtensorflow_1_1ops_1_1_fused_batch_norm_v2_1ad9498789c65ee5d72dd6402f5835b8b0) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [batch_variance](#classtensorflow_1_1ops_1_1_fused_batch_norm_v2_1af3991b993b39913909e81cd81d31c9c8) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_fused_batch_norm_v2_1a62346d231fb85e6491b13e4fc411ab46) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [reserve_space_1](#classtensorflow_1_1ops_1_1_fused_batch_norm_v2_1ab49ecd24ce13e304ef6ab0fab40d0db2) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [reserve_space_2](#classtensorflow_1_1ops_1_1_fused_batch_norm_v2_1ae91d40f4fb497e2879f0df7a2e9ee3b4) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [y](#classtensorflow_1_1ops_1_1_fused_batch_norm_v2_1a5d32535fa6ebf586beef899f5fa9d9d1) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public static functions ||\n|-------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|\n| [DataFormat](#classtensorflow_1_1ops_1_1_fused_batch_norm_v2_1a3067def97f7ccef0ca9214a5c3edcb65)`(StringPiece x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/fused-batch-norm-v2/attrs#structtensorflow_1_1ops_1_1_fused_batch_norm_v2_1_1_attrs) |\n| [Epsilon](#classtensorflow_1_1ops_1_1_fused_batch_norm_v2_1a23f682a773a88566f7b763b43f804830)`(float x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/fused-batch-norm-v2/attrs#structtensorflow_1_1ops_1_1_fused_batch_norm_v2_1_1_attrs) |\n| [IsTraining](#classtensorflow_1_1ops_1_1_fused_batch_norm_v2_1a3f4305936738a332346a877a56f0efd3)`(bool x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/fused-batch-norm-v2/attrs#structtensorflow_1_1ops_1_1_fused_batch_norm_v2_1_1_attrs) |\n\n| ### Structs ||\n|-------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::FusedBatchNormV2::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/fused-batch-norm-v2/attrs) | Optional attribute setters for [FusedBatchNormV2](/versions/r1.15/api_docs/cc/class/tensorflow/ops/fused-batch-norm-v2#classtensorflow_1_1ops_1_1_fused_batch_norm_v2). |\n\nPublic attributes\n-----------------\n\n### batch_mean\n\n```scdoc\n::tensorflow::Output batch_mean\n``` \n\n### batch_variance\n\n```gdscript\n::tensorflow::Output batch_variance\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\n### reserve_space_1\n\n```scdoc\n::tensorflow::Output reserve_space_1\n``` \n\n### reserve_space_2\n\n```scdoc\n::tensorflow::Output reserve_space_2\n``` \n\n### y\n\n```text\n::tensorflow::Output y\n``` \n\nPublic functions\n----------------\n\n### FusedBatchNormV2\n\n```gdscript\n FusedBatchNormV2(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input x,\n ::tensorflow::Input scale,\n ::tensorflow::Input offset,\n ::tensorflow::Input mean,\n ::tensorflow::Input variance\n)\n``` \n\n### FusedBatchNormV2\n\n```gdscript\n FusedBatchNormV2(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input x,\n ::tensorflow::Input scale,\n ::tensorflow::Input offset,\n ::tensorflow::Input mean,\n ::tensorflow::Input variance,\n const FusedBatchNormV2::Attrs & attrs\n)\n``` \n\nPublic static functions\n-----------------------\n\n### DataFormat\n\n```text\nAttrs DataFormat(\n StringPiece x\n)\n``` \n\n### Epsilon\n\n```text\nAttrs Epsilon(\n float x\n)\n``` \n\n### IsTraining\n\n```text\nAttrs IsTraining(\n bool x\n)\n```"]]