tensorflow :: ops :: کجا 3
#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
Tensor
which may have the same shape ascondition
. Ifcondition
is rank 1,x
may have higher rank, but its first dimension must match the size ofcondition
. - y: = A
Tensor
with 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
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
عملگر :: tensorflow :: ورودی
operator::tensorflow::Input() const
عملگر :: tensorflow :: خروجی
operator::tensorflow::Output() const
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2020-04-20 بهوقت ساعت هماهنگ جهانی.