Google I/O-তে টিউন করার জন্য ধন্যবাদ। চাহিদা অনুযায়ী সব সেশন দেখুন চাহিদা অনুযায়ী দেখুন

সেন্সরফ্লো :: অপস :: যেখানে 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