Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::FusedBatchNormGradV2
#include <nn_ops.h>
Gradient for batch normalization.
Summary
Note 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.
Args:
- scope: A Scope object
- y_backprop: A 4D Tensor for the gradient with respect to y.
- x: A 4D Tensor for input data.
- scale: A 1D Tensor for scaling factor, to scale the normalized x.
- reserve_space_1: When is_training is True, a 1D Tensor for the computed batch mean to be reused in gradient computation. When is_training is False, a 1D Tensor for the population mean to be reused in both 1st and 2nd order gradient computation.
- reserve_space_2: When is_training is True, a 1D Tensor for the computed batch variance (inverted variance in the cuDNN case) to be reused in gradient computation. When is_training is False, a 1D Tensor for the population variance to be reused in both 1st and 2nd order gradient computation.
Optional attributes (see Attrs
):
- epsilon: A small float number added to the variance of x.
- data_format: The data format for y_backprop, x, x_backprop. Either "NHWC" (default) or "NCHW".
- is_training: A bool value to indicate the operation is for training (default) or inference.
Returns:
Output
x_backprop: A 4D Tensor for the gradient with respect to x.
Output
scale_backprop: A 1D Tensor for the gradient with respect to scale.
Output
offset_backprop: A 1D Tensor for the gradient with respect to offset.
Output
reserve_space_3: Unused placeholder to match the mean input in FusedBatchNorm.
Output
reserve_space_4: Unused placeholder to match the variance input in FusedBatchNorm.
Constructors and Destructors
|
FusedBatchNormGradV2(const ::tensorflow::Scope & scope, ::tensorflow::Input y_backprop, ::tensorflow::Input x, ::tensorflow::Input scale, ::tensorflow::Input reserve_space_1, ::tensorflow::Input reserve_space_2)
|
FusedBatchNormGradV2(const ::tensorflow::Scope & scope, ::tensorflow::Input y_backprop, ::tensorflow::Input x, ::tensorflow::Input scale, ::tensorflow::Input reserve_space_1, ::tensorflow::Input reserve_space_2, const FusedBatchNormGradV2::Attrs & attrs)
|
Public attributes
Public functions
Public static functions
Attrs DataFormat(
StringPiece x
)
Epsilon
Attrs Epsilon(
float x
)
IsTraining
Attrs IsTraining(
bool x
)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2021-11-15 UTC.
[null,null,["Last updated 2021-11-15 UTC."],[],[],null,["# tensorflow::ops::FusedBatchNormGradV2 Class Reference\n\ntensorflow::ops::FusedBatchNormGradV2\n=====================================\n\n`#include \u003cnn_ops.h\u003e`\n\nGradient for batch 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\nArgs:\n\n- scope: A [Scope](/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- y_backprop: A 4D [Tensor](/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for the gradient with respect to y.\n- x: A 4D [Tensor](/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for input data.\n- scale: A 1D [Tensor](/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for scaling factor, to scale the normalized x.\n- reserve_space_1: When is_training is True, a 1D [Tensor](/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for the computed batch mean to be reused in gradient computation. When is_training is False, a 1D [Tensor](/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for the population mean to be reused in both 1st and 2nd order gradient computation.\n- reserve_space_2: When is_training is True, a 1D [Tensor](/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 gradient computation. When is_training is False, a 1D [Tensor](/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for the population variance to be reused in both 1st and 2nd order gradient computation.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/api_docs/cc/struct/tensorflow/ops/fused-batch-norm-grad-v2/attrs#structtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1_1_attrs)):\n\n- epsilon: A small float number added to the variance of x.\n- data_format: The data format for y_backprop, x, x_backprop. 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](/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) x_backprop: A 4D [Tensor](/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for the gradient with respect to x.\n- [Output](/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) scale_backprop: A 1D [Tensor](/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for the gradient with respect to scale.\n- [Output](/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) offset_backprop: A 1D [Tensor](/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for the gradient with respect to offset.\n- [Output](/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) reserve_space_3: Unused placeholder to match the mean input in [FusedBatchNorm](/api_docs/cc/class/tensorflow/ops/fused-batch-norm#classtensorflow_1_1ops_1_1_fused_batch_norm).\n- [Output](/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) reserve_space_4: Unused placeholder to match the variance input in [FusedBatchNorm](/api_docs/cc/class/tensorflow/ops/fused-batch-norm#classtensorflow_1_1ops_1_1_fused_batch_norm).\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [FusedBatchNormGradV2](#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1a86c8eb15c1fa6e765c1d7648e45357f4)`(const ::`[tensorflow::Scope](/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` y_backprop, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` x, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` scale, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` reserve_space_1, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` reserve_space_2)` ||\n| [FusedBatchNormGradV2](#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1ad137349082f7495a1b3ab2c72854a8b5)`(const ::`[tensorflow::Scope](/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` y_backprop, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` x, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` scale, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` reserve_space_1, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` reserve_space_2, const `[FusedBatchNormGradV2::Attrs](/api_docs/cc/struct/tensorflow/ops/fused-batch-norm-grad-v2/attrs#structtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|\n| [offset_backprop](#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1a573a935b4cc1b1bb19d4a2d75ebbf13d) | `::`[tensorflow::Output](/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1a4742048a5a4d494a534ebb4253cef274) | [Operation](/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [reserve_space_3](#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1aed1a4427bd98ce56394aef062fb9cecb) | `::`[tensorflow::Output](/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [reserve_space_4](#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1a5cadd7c94138dc3e294245ca7a0cb18f) | `::`[tensorflow::Output](/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [scale_backprop](#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1ad01de4d69bdfca21353023d588abf004) | `::`[tensorflow::Output](/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [x_backprop](#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1a5eecc4926429818678c3e35d36b11930) | `::`[tensorflow::Output](/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_grad_v2_1a7143f83d7e6e604147b10e6be3b7f5ba)`(StringPiece x)` | [Attrs](/api_docs/cc/struct/tensorflow/ops/fused-batch-norm-grad-v2/attrs#structtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1_1_attrs) |\n| [Epsilon](#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1a991011a32051ef190fd0028fbb5f7fb5)`(float x)` | [Attrs](/api_docs/cc/struct/tensorflow/ops/fused-batch-norm-grad-v2/attrs#structtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1_1_attrs) |\n| [IsTraining](#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1a87dc995a72a9c52136f68d7eb2b8b588)`(bool x)` | [Attrs](/api_docs/cc/struct/tensorflow/ops/fused-batch-norm-grad-v2/attrs#structtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1_1_attrs) |\n\n| ### Structs ||\n|-------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::FusedBatchNormGradV2::Attrs](/api_docs/cc/struct/tensorflow/ops/fused-batch-norm-grad-v2/attrs) | Optional attribute setters for [FusedBatchNormGradV2](/api_docs/cc/class/tensorflow/ops/fused-batch-norm-grad-v2#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2). |\n\nPublic attributes\n-----------------\n\n### offset_backprop\n\n```scdoc\n::tensorflow::Output offset_backprop\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\n### reserve_space_3\n\n```scdoc\n::tensorflow::Output reserve_space_3\n``` \n\n### reserve_space_4\n\n```scdoc\n::tensorflow::Output reserve_space_4\n``` \n\n### scale_backprop\n\n```scdoc\n::tensorflow::Output scale_backprop\n``` \n\n### x_backprop\n\n```scdoc\n::tensorflow::Output x_backprop\n``` \n\nPublic functions\n----------------\n\n### FusedBatchNormGradV2\n\n```gdscript\n FusedBatchNormGradV2(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input y_backprop,\n ::tensorflow::Input x,\n ::tensorflow::Input scale,\n ::tensorflow::Input reserve_space_1,\n ::tensorflow::Input reserve_space_2\n)\n``` \n\n### FusedBatchNormGradV2\n\n```gdscript\n FusedBatchNormGradV2(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input y_backprop,\n ::tensorflow::Input x,\n ::tensorflow::Input scale,\n ::tensorflow::Input reserve_space_1,\n ::tensorflow::Input reserve_space_2,\n const FusedBatchNormGradV2::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```"]]