Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::ResourceSparseApplyRMSProp
#include <training_ops.h>
Update '*var' according to the RMSProp algorithm.
Summary
Note that in dense implementation of this algorithm, ms and mom will update even if the grad is zero, but in this sparse implementation, ms and mom will not update in iterations during which the grad is zero.
mean_square = decay * mean_square + (1-decay) * gradient ** 2 Delta = learning_rate * gradient / sqrt(mean_square + epsilon)
ms <- rho * ms_{t-1} + (1-rho) * grad * grad mom <- momentum * mom_{t-1} + lr * grad / sqrt(ms + epsilon) var <- var - mom
Args:
- scope: A Scope object
- var: Should be from a Variable().
- ms: Should be from a Variable().
- mom: Should be from a Variable().
- lr: Scaling factor. Must be a scalar.
- rho: Decay rate. Must be a scalar.
- epsilon: Ridge term. Must be a scalar.
- grad: The gradient.
- indices: A vector of indices into the first dimension of var, ms and mom.
Optional attributes (see Attrs
):
- use_locking: If
True
, updating of the var, ms, and mom tensors is protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.
Returns:
Constructors and Destructors
|
ResourceSparseApplyRMSProp(const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input ms, ::tensorflow::Input mom, ::tensorflow::Input lr, ::tensorflow::Input rho, ::tensorflow::Input momentum, ::tensorflow::Input epsilon, ::tensorflow::Input grad, ::tensorflow::Input indices)
|
ResourceSparseApplyRMSProp(const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input ms, ::tensorflow::Input mom, ::tensorflow::Input lr, ::tensorflow::Input rho, ::tensorflow::Input momentum, ::tensorflow::Input epsilon, ::tensorflow::Input grad, ::tensorflow::Input indices, const ResourceSparseApplyRMSProp::Attrs & attrs)
|
Public attributes
Public functions
ResourceSparseApplyRMSProp
ResourceSparseApplyRMSProp(
const ::tensorflow::Scope & scope,
::tensorflow::Input var,
::tensorflow::Input ms,
::tensorflow::Input mom,
::tensorflow::Input lr,
::tensorflow::Input rho,
::tensorflow::Input momentum,
::tensorflow::Input epsilon,
::tensorflow::Input grad,
::tensorflow::Input indices,
const ResourceSparseApplyRMSProp::Attrs & attrs
)
operator::tensorflow::Operation
operator::tensorflow::Operation() const
Public static functions
UseLocking
Attrs UseLocking(
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2021-11-15 UTC."],[],[],null,["# tensorflow::ops::ResourceSparseApplyRMSProp Class Reference\n\ntensorflow::ops::ResourceSparseApplyRMSProp\n===========================================\n\n`#include \u003ctraining_ops.h\u003e`\n\nUpdate '\\*var' according to the RMSProp algorithm.\n\nSummary\n-------\n\nNote that in dense implementation of this algorithm, ms and mom will update even if the grad is zero, but in this sparse implementation, ms and mom will not update in iterations during which the grad is zero.\n\nmean_square = decay \\* mean_square + (1-decay) \\* gradient \\*\\* 2 Delta = learning_rate \\* gradient / sqrt(mean_square + epsilon)\n\nms \\\u003c- rho \\* ms_{t-1} + (1-rho) \\* grad \\* grad mom \\\u003c- momentum \\* mom_{t-1} + lr \\* grad / sqrt(ms + epsilon) var \\\u003c- var - mom\n\nArgs:\n\n- scope: A [Scope](/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- var: Should be from a Variable().\n- ms: Should be from a Variable().\n- mom: Should be from a Variable().\n- lr: Scaling factor. Must be a scalar.\n- rho: Decay rate. Must be a scalar.\n- epsilon: Ridge term. Must be a scalar.\n- grad: The gradient.\n- indices: A vector of indices into the first dimension of var, ms and mom.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/api_docs/cc/struct/tensorflow/ops/resource-sparse-apply-r-m-s-prop/attrs#structtensorflow_1_1ops_1_1_resource_sparse_apply_r_m_s_prop_1_1_attrs)):\n\n- use_locking: If `True`, updating of the var, ms, and mom tensors is protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.\n\n\u003cbr /\u003e\n\nReturns:\n\n- the created [Operation](/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation)\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ResourceSparseApplyRMSProp](#classtensorflow_1_1ops_1_1_resource_sparse_apply_r_m_s_prop_1aff53e99b8e6dc505fb48976158d11f39)`(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)` var, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` ms, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` mom, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` lr, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` rho, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` momentum, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` epsilon, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` grad, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` indices)` ||\n| [ResourceSparseApplyRMSProp](#classtensorflow_1_1ops_1_1_resource_sparse_apply_r_m_s_prop_1aba358e7d7c7d78bfcdc5eaed2530fa16)`(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)` var, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` ms, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` mom, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` lr, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` rho, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` momentum, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` epsilon, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` grad, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` indices, const `[ResourceSparseApplyRMSProp::Attrs](/api_docs/cc/struct/tensorflow/ops/resource-sparse-apply-r-m-s-prop/attrs#structtensorflow_1_1ops_1_1_resource_sparse_apply_r_m_s_prop_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_resource_sparse_apply_r_m_s_prop_1abcff2e138b5825b7fe66d8d9e68c9b7f) | [Operation](/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [operator::tensorflow::Operation](#classtensorflow_1_1ops_1_1_resource_sparse_apply_r_m_s_prop_1ae4f96774d9e75c094f13f6ea8d5ca0b6)`() const ` | |\n\n| ### Public static functions ||\n|-------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [UseLocking](#classtensorflow_1_1ops_1_1_resource_sparse_apply_r_m_s_prop_1a19ab4ce72ae4d3db4e8b7daa0c72ff60)`(bool x)` | [Attrs](/api_docs/cc/struct/tensorflow/ops/resource-sparse-apply-r-m-s-prop/attrs#structtensorflow_1_1ops_1_1_resource_sparse_apply_r_m_s_prop_1_1_attrs) |\n\n| ### Structs ||\n|---------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::ResourceSparseApplyRMSProp::Attrs](/api_docs/cc/struct/tensorflow/ops/resource-sparse-apply-r-m-s-prop/attrs) | Optional attribute setters for [ResourceSparseApplyRMSProp](/api_docs/cc/class/tensorflow/ops/resource-sparse-apply-r-m-s-prop#classtensorflow_1_1ops_1_1_resource_sparse_apply_r_m_s_prop). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### ResourceSparseApplyRMSProp\n\n```gdscript\n ResourceSparseApplyRMSProp(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input var,\n ::tensorflow::Input ms,\n ::tensorflow::Input mom,\n ::tensorflow::Input lr,\n ::tensorflow::Input rho,\n ::tensorflow::Input momentum,\n ::tensorflow::Input epsilon,\n ::tensorflow::Input grad,\n ::tensorflow::Input indices\n)\n``` \n\n### ResourceSparseApplyRMSProp\n\n```gdscript\n ResourceSparseApplyRMSProp(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input var,\n ::tensorflow::Input ms,\n ::tensorflow::Input mom,\n ::tensorflow::Input lr,\n ::tensorflow::Input rho,\n ::tensorflow::Input momentum,\n ::tensorflow::Input epsilon,\n ::tensorflow::Input grad,\n ::tensorflow::Input indices,\n const ResourceSparseApplyRMSProp::Attrs & attrs\n)\n``` \n\n### operator::tensorflow::Operation\n\n```gdscript\n operator::tensorflow::Operation() const \n``` \n\nPublic static functions\n-----------------------\n\n### UseLocking\n\n```text\nAttrs UseLocking(\n bool x\n)\n```"]]