【发布时间】:2018-02-07 19:21:52
【问题描述】:
在“rmsprop.py”(在 TensorFlow 中)中有一个对方法 apply_rms_prop 的调用。此方法在“gen_training_ops.py”中定义。在这个方法的定义中有一条注释描述了它应该做什么:
ms <- rho * ms_{t-1} + (1-rho) * grad * grad
mom <- momentum * mom_{t-1} + lr * grad / sqrt(ms + epsilon)
var <- var - mom
但我似乎找不到上面伪代码的实际 python 实现在哪里。我的猜测是它是在 cpython 中实现的,因为我能够找到文件“__pycache__/rmsprop.cpython-36.pyc”。但同样,执行上述伪代码的 cpython 实现在哪里?
我的目标是实现自己的梯度更新方法,所以我需要看一些具体的实现示例(例如rmsprop、adam等)。任何帮助将非常感激!
【问题讨论】:
标签: python-3.x tensorflow gradient-descent