تدفق التوتر:: العمليات:: ResourceApplyKerasMomentum
#include <training_ops.h>
قم بتحديث '*var' وفقًا لمخطط الزخم.
ملخص
اضبط use_nesterov = صحيح إذا كنت
تريد استخدام زخم نيستيروف.
تراكم = تراكم * الزخم - lr * غراد var += تراكم
الحجج:
- النطاق: كائن النطاق
- فار: يجب أن يكون من متغير ().
- تراكم: يجب أن يكون من متغير ().
- lr: عامل التحجيم. يجب أن يكون العددية.
- غراد: التدرج.
- الزخم : الزخم . يجب أن يكون العددية.
السمات الاختيارية (انظر Attrs
):
- use_locking: إذا كان
True
، فسيتم حماية تحديث موترتي var وaccum بواسطة قفل؛ وإلا فإن السلوك غير محدد، ولكنه قد يحمل قدرًا أقل من الخلاف. - use_nesterov: إذا كان
True
، فإن الموتر الذي تم تمريره لحساب الدرجة سيكون var + كمية الحركة * تراكم، لذا في النهاية، فإن var الذي تحصل عليه هو في الواقع var + كمية الحركة * تراكم.
العوائد:
-
Operation
التي تم إنشاؤها
البنائين والمدمرين | |
---|---|
ResourceApplyKerasMomentum (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input momentum) | |
ResourceApplyKerasMomentum (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input momentum, const ResourceApplyKerasMomentum::Attrs & attrs) |
الصفات العامة | |
---|---|
operation |
الوظائف العامة | |
---|---|
operator::tensorflow::Operation () const |
وظائف ثابتة العامة | |
---|---|
UseLocking (bool x) | |
UseNesterov (bool x) |
الهياكل | |
---|---|
Tensorflow:: ops:: ResourceApplyKerasMomentum:: Attrs | محددات السمات الاختيارية لـ ResourceApplyKerasMomentum . |
الصفات العامة
عملية
Operation operation
الوظائف العامة
ResourceApplyKerasMomentum
ResourceApplyKerasMomentum( const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input accum, ::tensorflow::Input lr, ::tensorflow::Input grad, ::tensorflow::Input momentum )
ResourceApplyKerasMomentum
ResourceApplyKerasMomentum( const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input accum, ::tensorflow::Input lr, ::tensorflow::Input grad, ::tensorflow::Input momentum, const ResourceApplyKerasMomentum::Attrs & attrs )