Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::LRN
#include <nn_ops.h>
Local Response Normalization.
Summary
The 4-D input
tensor is treated as a 3-D array of 1-D vectors (along the last dimension), and each vector is normalized independently. Within a given vector, each component is divided by the weighted, squared sum of inputs within depth_radius
. In detail,
sqr_sum[a, b, c, d] =
sum(input[a, b, c, d - depth_radius : d + depth_radius + 1] ** 2)
output = input / (bias + alpha * sqr_sum) ** beta
For details, see Krizhevsky et al., ImageNet classification with deep convolutional neural networks (NIPS 2012).
Arguments:
- scope: A Scope object
- input: 4-D.
Optional attributes (see Attrs
):
- depth_radius: 0-D. Half-width of the 1-D normalization window.
- bias: An offset (usually positive to avoid dividing by 0).
- alpha: A scale factor, usually positive.
- beta: An exponent.
Returns:
Public attributes
Public functions
node
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Public static functions
Alpha
Attrs Alpha(
float x
)
Beta
Attrs Beta(
float x
)
Bias
Attrs Bias(
float x
)
DepthRadius
Attrs DepthRadius(
int64 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.
Last updated 2020-04-20 UTC.
[null,null,["Last updated 2020-04-20 UTC."],[],[],null,["# tensorflow::ops::LRN Class Reference\n\ntensorflow::ops::LRN\n====================\n\n`#include \u003cnn_ops.h\u003e`\n\nLocal Response Normalization.\n\nSummary\n-------\n\nThe 4-D `input` tensor is treated as a 3-D array of 1-D vectors (along the last dimension), and each vector is normalized independently. Within a given vector, each component is divided by the weighted, squared sum of inputs within `depth_radius`. In detail, \n\n```scdoc\nsqr_sum[a, b, c, d] =\n sum(input[a, b, c, d - depth_radius : d + depth_radius + 1] ** 2)\noutput = input / (bias + alpha * sqr_sum) ** beta\n```\n\n\u003cbr /\u003e\n\nFor details, see [Krizhevsky et al., ImageNet classification with deep convolutional neural networks (NIPS 2012)](http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks).\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: 4-D.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/l-r-n/attrs#structtensorflow_1_1ops_1_1_l_r_n_1_1_attrs)):\n\n- depth_radius: 0-D. Half-width of the 1-D normalization window.\n- bias: An offset (usually positive to avoid dividing by 0).\n- alpha: A scale factor, usually positive.\n- beta: An exponent.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The output tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [LRN](#classtensorflow_1_1ops_1_1_l_r_n_1adbadf9462bc6ae9916f535bb2aa2762f)`(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)` input)` ||\n| [LRN](#classtensorflow_1_1ops_1_1_l_r_n_1ab702d3657c46710fcf7a63f7c712c5df)`(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)` input, const `[LRN::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/l-r-n/attrs#structtensorflow_1_1ops_1_1_l_r_n_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_l_r_n_1a001e6e41e5fb3ff78b42decdd680ea82) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_l_r_n_1a69396918e55e1de00f68a1113ef173b0) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_l_r_n_1aa28d07232c5df13dad811653f1276a2a)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_l_r_n_1aa00d48e5a8ca805aa2532b7155b8c28b)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_l_r_n_1ae58da447d50c92abb12785d8ab7b618b)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------|\n| [Alpha](#classtensorflow_1_1ops_1_1_l_r_n_1a7788a93182ddfbf8bb5bd1820b081392)`(float x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/l-r-n/attrs#structtensorflow_1_1ops_1_1_l_r_n_1_1_attrs) |\n| [Beta](#classtensorflow_1_1ops_1_1_l_r_n_1a6bbb26306e2265f6e2368f5dfb39ef13)`(float x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/l-r-n/attrs#structtensorflow_1_1ops_1_1_l_r_n_1_1_attrs) |\n| [Bias](#classtensorflow_1_1ops_1_1_l_r_n_1ac8da24639c0d90ef6e68df756f3e345f)`(float x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/l-r-n/attrs#structtensorflow_1_1ops_1_1_l_r_n_1_1_attrs) |\n| [DepthRadius](#classtensorflow_1_1ops_1_1_l_r_n_1ac579054901f30ab7fd4989ca39237a0e)`(int64 x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/l-r-n/attrs#structtensorflow_1_1ops_1_1_l_r_n_1_1_attrs) |\n\n| ### Structs ||\n|----------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::LRN::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/l-r-n/attrs) | Optional attribute setters for [LRN](/versions/r1.15/api_docs/cc/class/tensorflow/ops/l-r-n#classtensorflow_1_1ops_1_1_l_r_n). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### LRN\n\n```gdscript\n LRN(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input\n)\n``` \n\n### LRN\n\n```gdscript\n LRN(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n const LRN::Attrs & attrs\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``` \n\nPublic static functions\n-----------------------\n\n### Alpha\n\n```text\nAttrs Alpha(\n float x\n)\n``` \n\n### Beta\n\n```text\nAttrs Beta(\n float x\n)\n``` \n\n### Bias\n\n```text\nAttrs Bias(\n float x\n)\n``` \n\n### DepthRadius\n\n```text\nAttrs DepthRadius(\n int64 x\n)\n```"]]