সেন্সরফ্লো :: অপস :: ScatterNdSub
#include <state_ops.h>
একটি পরিবর্তনীয় পৃথক মান বা স্লাইসগুলিতে বিচ্ছিন্ন বিয়োগফল প্রয়োগ করে।
সারসংক্ষেপ
indices
অনুসারে প্রদত্ত ভেরিয়েবলের মধ্যে।
ref
P
র্যাঙ্ক সহ একটি Tensor
এবং indices
র্যাঙ্ক Q
এর একটি Tensor
।
indices
অবশ্যই ref
মধ্যে সূচকগুলি সহ পূর্ণসংখ্যা টেনসর হতে হবে। এটি অবশ্যই [d_0, ..., d_{Q-2}, K]
আকারের হবে যেখানে 0 < K <= P
।
indices
অভ্যন্তরীণ মাত্রা (দৈর্ঘ্যের K
) সূচকগুলির সাথে সূত্রের সাথে উপাদানগুলির (যদি K = P
) যোগ করে বা ref
K
ম মাত্রার সাথে স্লাইস (যদি K < P
) হয়।
updates
হ'ল আকার Q-1+PK
র্যাঙ্কের Tensor
:
[d_0, ..., d_{Q-2}, ref.shape[K], ..., ref.shape[P-1]]
উদাহরণস্বরূপ, বলুন যে আমরা 8 টি উপাদান সহ র্যাঙ্ক -1 টেনসর থেকে 4 বিক্ষিপ্ত উপাদানগুলি বিয়োগ করতে চাই। পাইথনে, সেই বিয়োগটি দেখতে এই রকম হবে:
ref = tf.Variable([1, 2, 3, 4, 5, 6, 7, 8]) indices = tf.constant([[4], [3], [1], [7]]) updates = tf.constant([9, 10, 11, 12]) sub = tf.scatter_nd_sub(ref, indices, updates) with tf.Session() as sess: print sess.run(sub)
রেফের ফলাফলের আপডেটটি এর মতো দেখতে পাবেন:
[1, -9, 3, -6, -4, 6, 7, -4]
tf.scatter_nd
আপডেট কীভাবে করা যায় সে সম্পর্কে আরও তথ্যের জন্য tf.scatter_nd
দেখুন See
যুক্তি:
- সুযোগ: একটি স্কোপ অবজেক্ট
- রেফ: একটি পরিবর্তনীয় টেনসর । চলক নোড থেকে হওয়া উচিত।
- সূচকগুলি: একটি টেন্সর । নিম্নলিখিত ধরণেরগুলির একটি হতে হবে: int32, int64। রেফারেন্সে সূচকগুলির একটি সেন্সর।
- আপডেট: একটি টেনসর । রেফের মতো একই ধরণের থাকতে হবে। রেফ থেকে বিয়োগ করতে আপডেট হওয়া মানগুলির একটি সেন্সর।
- ব্যবহার_লকিং: একটি optionচ্ছিক বুল। সত্য থেকে ডিফল্ট। যদি সত্য হয় তবে অ্যাসাইনমেন্টটি একটি লক দ্বারা সুরক্ষিত হবে; অন্যথায় আচরণটি সংজ্ঞায়িত হলেও কম বিতর্ক প্রদর্শন করতে পারে।
রিটার্নস:
-
Output
: রেফ হিসাবে একই। আপডেট হয়ে যাওয়ার পরে আপডেট হওয়া মানগুলি ব্যবহার করতে চায় এমন ক্রিয়াকলাপগুলির সুবিধার্থে ফিরে এসেছে।
নির্মাণকারী এবং ধ্বংসকারী | |
---|---|
ScatterNdSub (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input indices, :: tensorflow::Input updates) | |
ScatterNdSub (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input indices, :: tensorflow::Input updates, const ScatterNdSub::Attrs & attrs) |
জনসাধারণের গুণাবলী | |
---|---|
operation | |
output_ref |
পাবলিক ফাংশন | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
পাবলিক স্ট্যাটিক ফাংশন | |
---|---|
UseLocking (bool x) |
স্ট্রাক্টস | |
---|---|
টেনসরফ্লো :: অপস :: স্ক্যাটারএনডিএসব :: অ্যাটারস | ScatterNdSub এর জন্য .চ্ছিক বৈশিষ্ট্য সেটটার । |
জনসাধারণের গুণাবলী
অপারেশন
Operation operation
আউটপুট_রেফ
::tensorflow::Output output_ref
পাবলিক ফাংশন
ScatterNdSub
ScatterNdSub( const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates )
ScatterNdSub
ScatterNdSub( const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates, const ScatterNdSub::Attrs & attrs )
নোড
::tensorflow::Node * node() const
অপারেটর :: টেনসরফ্লো :: ইনপুট
operator::tensorflow::Input() const
অপারেটর :: টেনসরফ্লো :: আউটপুট
operator::tensorflow::Output() const
পাবলিক স্ট্যাটিক ফাংশন
ইউজলকিং
Attrs UseLocking( bool x )