tensorflow:: ops:: ApplyMomentum
#include <training_ops.h>মোমেন্টাম স্কিম অনুযায়ী '*var' আপডেট করুন।
সারসংক্ষেপ
যদি আপনি use_nesterov = True সেট করেন
নেস্টেরভ ভরবেগ ব্যবহার করতে চাই।
accum = accum * ভরবেগ + grad var -= lr * accum
যুক্তি:
- স্কোপ: একটি স্কোপ অবজেক্ট
- var: Variable() থেকে আসা উচিত।
- accum: এটি একটি Variable() থেকে আসা উচিত।
- lr: স্কেলিং ফ্যাক্টর। এটি অবশ্যই একটি স্কেলার হতে হবে।
- grad: নতিমাত্রা।
- ভরবেগ: ভরবেগ। অবশ্যই স্কেলার হতে হবে।
ঐচ্ছিক অ্যাট্রিবিউটসমূহ (দেখুন Attrs ):
- use_locking: যদি
True, তাহলে var এবং accum টেনসরগুলোর আপডেট একটি লক দ্বারা সুরক্ষিত থাকবে; অন্যথায় এর আচরণ অনির্ধারিত, তবে এতে কনটেনশন কম হতে পারে। - use_nesterov: যদি
True, তাহলে compute grad-এ পাঠানো টেনসরটি হবে var - lr * momentum * accum, ফলে সবশেষে আপনি যে var পাবেন, সেটিও আসলে var - lr * momentum * accum হবে।
ফেরত:
-
Output: "var"-এর অনুরূপ।
নির্মাতা এবং ধ্বংসকারী | |
|---|---|
ApplyMomentum (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input momentum) | |
ApplyMomentum (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input momentum, const ApplyMomentum::Attrs & attrs) |
জনসাধারণের বৈশিষ্ট্য | |
|---|---|
operation | |
out | |
জনসাধারণের কার্যাবলী | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
পাবলিক স্ট্যাটিক ফাংশন | |
|---|---|
UseLocking (bool x) | |
UseNesterov (bool x) | |
কাঠামো | |
|---|---|
| tensorflow:: ops:: ApplyMomentum:: Attrs | ApplyMomentum-এর জন্য ঐচ্ছিক অ্যাট্রিবিউট সেটার। |
জনসাধারণের বৈশিষ্ট্য
অপারেশন
Operation operation
বাইরে
::tensorflow::Output out
জনসাধারণের কার্যাবলী
অ্যাপ্লাইমোমেন্টাম
ApplyMomentum( const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input accum, ::tensorflow::Input lr, ::tensorflow::Input grad, ::tensorflow::Input momentum )
অ্যাপ্লাইমোমেন্টাম
ApplyMomentum( const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input accum, ::tensorflow::Input lr, ::tensorflow::Input grad, ::tensorflow::Input momentum, const ApplyMomentum::Attrs & attrs )
নোড
::tensorflow::Node * node() const
অপারেটর::টেনসরফ্লো::ইনপুট
operator::tensorflow::Input() const
অপারেটর::টেনসরফ্লো::আউটপুট
operator::tensorflow::Output() const
পাবলিক স্ট্যাটিক ফাংশন
ইউজলকিং
Attrs UseLocking( bool x )
UseNesterov
Attrs UseNesterov( bool x )