টেনসরফ্লো :: অপস:: যেখানে3

#include <math_ops.h>

condition উপর নির্ভর করে x বা y থেকে উপাদান নির্বাচন করে।

সারসংক্ষেপ

x , এবং y টেনসরগুলির অবশ্যই একই আকৃতি থাকতে হবে এবং আউটপুটেও সেই আকৃতি থাকবে৷

condition টেনসর অবশ্যই একটি স্কেলার হতে হবে যদি x এবং y স্কেলার হয়। যদি 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 Tensor which may have the same shape as condition. If condition is rank 1, x may have higher rank, but its first dimension must match the size of condition.
  • y: = A Tensor with the same type and shape as x.

Returns:

  • Output: = A Tensor with the same type and shape as x and y.

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

operation

Operation operation

আউটপুট

::tensorflow::Output output

পাবলিক ফাংশন

যেখানে3

 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