tf.raw_ops.ApplyCenteredRMSProp
bookmark_borderbookmark
Stay organized with collections
Save and categorize content based on your preferences.
Update '*var' according to the centered RMSProp algorithm.
View aliases
Compat aliases for migration
See
Migration guide for
more details.
tf.compat.v1.raw_ops.ApplyCenteredRMSProp
tf.raw_ops.ApplyCenteredRMSProp(
var,
mg,
ms,
mom,
lr,
rho,
momentum,
epsilon,
grad,
use_locking=False,
name=None
)
The centered RMSProp algorithm uses an estimate of the centered second moment
(i.e., the variance) for normalization, as opposed to regular RMSProp, which
uses the (uncentered) second moment. This often helps with training, but is
slightly more expensive in terms of computation and memory.
Note that in dense implementation of this algorithm, mg, ms, and mom will
update even if the grad is zero, but in this sparse implementation, mg, ms,
and mom will not update in iterations during which the grad is zero.
mean_square = decay * mean_square + (1-decay) * gradient ** 2
mean_grad = decay * mean_grad + (1-decay) * gradient
Delta = learning_rate * gradient / sqrt(mean_square + epsilon - mean_grad ** 2)
mg <- rho * mg{t-1} + (1-rho) * grad
ms <- rho * ms{t-1} + (1-rho) * grad * grad
mom <- momentum * mom_{t-1} + lr * grad / sqrt(ms - mg * mg + epsilon)
var <- var - mom
Args |
var
|
A mutable Tensor . Must be one of the following types: float32 , float64 , int32 , uint8 , int16 , int8 , complex64 , int64 , qint8 , quint8 , qint32 , bfloat16 , qint16 , quint16 , uint16 , complex128 , half , uint32 , uint64 .
Should be from a Variable().
|
mg
|
A mutable Tensor . Must have the same type as var .
Should be from a Variable().
|
ms
|
A mutable Tensor . Must have the same type as var .
Should be from a Variable().
|
mom
|
A mutable Tensor . Must have the same type as var .
Should be from a Variable().
|
lr
|
A Tensor . Must have the same type as var .
Scaling factor. Must be a scalar.
|
rho
|
A Tensor . Must have the same type as var .
Decay rate. Must be a scalar.
|
momentum
|
A Tensor . Must have the same type as var .
Momentum Scale. Must be a scalar.
|
epsilon
|
A Tensor . Must have the same type as var .
Ridge term. Must be a scalar.
|
grad
|
A Tensor . Must have the same type as var . The gradient.
|
use_locking
|
An optional bool . Defaults to False .
If True , updating of the var, mg, ms, and mom tensors is
protected by a lock; otherwise the behavior is undefined, but may exhibit less
contention.
|
name
|
A name for the operation (optional).
|
Returns |
A mutable Tensor . Has the same type as var .
|
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 2024-04-26 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 2024-04-26 UTC."],[],[],null,["# tf.raw_ops.ApplyCenteredRMSProp\n\n\u003cbr /\u003e\n\nUpdate '\\*var' according to the centered RMSProp algorithm.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.raw_ops.ApplyCenteredRMSProp`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/ApplyCenteredRMSProp)\n\n\u003cbr /\u003e\n\n tf.raw_ops.ApplyCenteredRMSProp(\n var,\n mg,\n ms,\n mom,\n lr,\n rho,\n momentum,\n epsilon,\n grad,\n use_locking=False,\n name=None\n )\n\nThe centered RMSProp algorithm uses an estimate of the centered second moment\n(i.e., the variance) for normalization, as opposed to regular RMSProp, which\nuses the (uncentered) second moment. This often helps with training, but is\nslightly more expensive in terms of computation and memory.\n\nNote that in dense implementation of this algorithm, mg, ms, and mom will\nupdate even if the grad is zero, but in this sparse implementation, mg, ms,\nand mom will not update in iterations during which the grad is zero.\n\nmean_square = decay \\* mean_square + (1-decay) \\* gradient \\*\\* 2\nmean_grad = decay \\* mean_grad + (1-decay) \\* gradient\n\nDelta = learning_rate \\* gradient / sqrt(mean_square + epsilon - mean_grad \\*\\* 2)\n\nmg \\\u003c- rho \\* mg*{t-1} + (1-rho) \\* grad\nms \\\u003c- rho \\* ms*{t-1} + (1-rho) \\* grad \\* grad\nmom \\\u003c- momentum \\* mom_{t-1} + lr \\* grad / sqrt(ms - mg \\* mg + epsilon)\nvar \\\u003c- var - mom\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `var` | A mutable `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `complex64`, `int64`, `qint8`, `quint8`, `qint32`, `bfloat16`, `qint16`, `quint16`, `uint16`, `complex128`, `half`, `uint32`, `uint64`. Should be from a Variable(). |\n| `mg` | A mutable `Tensor`. Must have the same type as `var`. Should be from a Variable(). |\n| `ms` | A mutable `Tensor`. Must have the same type as `var`. Should be from a Variable(). |\n| `mom` | A mutable `Tensor`. Must have the same type as `var`. Should be from a Variable(). |\n| `lr` | A `Tensor`. Must have the same type as `var`. Scaling factor. Must be a scalar. |\n| `rho` | A `Tensor`. Must have the same type as `var`. Decay rate. Must be a scalar. |\n| `momentum` | A `Tensor`. Must have the same type as `var`. Momentum Scale. Must be a scalar. |\n| `epsilon` | A `Tensor`. Must have the same type as `var`. Ridge term. Must be a scalar. |\n| `grad` | A `Tensor`. Must have the same type as `var`. The gradient. |\n| `use_locking` | An optional `bool`. Defaults to `False`. If `True`, updating of the var, mg, ms, and mom tensors is protected by a lock; otherwise the behavior is undefined, but may exhibit less contention. |\n| `name` | A name for the operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A mutable `Tensor`. Has the same type as `var`. ||\n\n\u003cbr /\u003e"]]