tensorflow:: ops:: Where3
#include <math_ops.h> condition উপর নির্ভর করে x অথবা y থেকে উপাদান নির্বাচন করে।
সারসংক্ষেপ
x এবং y টেনসরগুলোর আকৃতি অবশ্যই একই হতে হবে এবং আউটপুটের আকৃতিও সেরকমই হবে।
যদি x এবং y স্কেলার হয়, তবে condition টেনসরটিও অবশ্যই একটি স্কেলার হতে হবে। যদি x এবং y ভেক্টর বা উচ্চতর র্যাঙ্কের হয়, তবে condition অবশ্যই একটি স্কেলার, অথবা x এর প্রথম ডাইমেনশনের সমান আকারের একটি ভেক্টর, অথবা x এর সমান আকৃতির হতে হবে।
condition টেনসরটি একটি মাস্ক হিসেবে কাজ করে, যা প্রতিটি উপাদানের মানের উপর ভিত্তি করে নির্ধারণ করে যে আউটপুটের সংশ্লিষ্ট উপাদান/সারিটি x (সত্য হলে) নাকি y (মিথ্যা হলে) থেকে নেওয়া হবে।
যদি condition একটি ভেক্টর হয় এবং x ও y উচ্চ র্যাঙ্কের ম্যাট্রিক্স হয়, তাহলে এটি x ও y থেকে কোন সারিটি (বাইরের মাত্রা) অনুলিপি করবে তা বেছে নেয়। যদি condition আকৃতি x ও y এর সমান হয়, তাহলে এটি x ও y থেকে কোন উপাদানটি অনুলিপি করবে তা বেছে নেয়।
উদাহরণস্বরূপ:
# 'condition' tensor is [[True, False] # [False, True]] # 't' is [[1, 2], # [3, 4]] # 'e' is [[5, 6], # [7, 8]] select(condition, t, e) # => [[1, 6], [7, 4]]
# 'condition' tensor is [True, False]
# 't' is [[1, 2],
# [3, 4]]
# 'e' is [[5, 6],
# [7, 8]]
select(condition, t, e) ==> [[1, 2],
[7, 8]]Arguments:
- scope: A Scope object
- x: = A
Tensorwhich may have the same shape ascondition. Ifconditionis rank 1,xmay have higher rank, but its first dimension must match the size ofcondition. - y: = A
Tensorwith the same type and shape asx.
Returns:
Constructors and Destructors |
|
|---|---|
Where3(const ::tensorflow::Scope & scope, ::tensorflow::Input condition, ::tensorflow::Input x, ::tensorflow::Input y)
|
Public attributes |
|
|---|---|
operation
|
|
output
|
|
Public functions |
|
|---|---|
node() const
|
::tensorflow::Node *
|
operator::tensorflow::Input() const
|
|
operator::tensorflow::Output() const
|
|
Public attributes
আউটপুট
::tensorflow::Output output
জনসাধারণের কার্যাবলী
যেখানে৩
Where3( const ::tensorflow::Scope & scope, ::tensorflow::Input condition, ::tensorflow::Input x, ::tensorflow::Input y )
নোড
::tensorflow::Node * node() const
অপারেটর::টেনসরফ্লো::ইনপুট
operator::tensorflow::Input() const
অপারেটর::টেনসরফ্লো::আউটপুট
operator::tensorflow::Output() const